[GH-ISSUE #1030] [FEATURE REQUEST] asynq: task lease expired #2515

Open
opened 2026-03-15 20:45:43 +03:00 by kerem · 1 comment
Owner

Originally created by @scp-66 on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/hibiken/asynq/issues/1030

Originally assigned to: @hibiken, @kamikazechaser on GitHub.

The LeaseDuration in rdb.go should be configurable, as it directly affects the processes of all tasks. If it always defaults to 30 seconds, tasks that require relatively long processing times will frequently encounter lease expiration and continually retry the same task.

	case <-lease.Done():
				cancel()
				p.handleFailedMessage(ctx, lease, msg, ErrLeaseExpired)
				return
Originally created by @scp-66 on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/hibiken/asynq/issues/1030 Originally assigned to: @hibiken, @kamikazechaser on GitHub. The LeaseDuration in rdb.go should be configurable, as it directly affects the processes of all tasks. If it always defaults to 30 seconds, tasks that require relatively long processing times will frequently encounter lease expiration and continually retry the same task. ``` case <-lease.Done(): cancel() p.handleFailedMessage(ctx, lease, msg, ErrLeaseExpired) return ```
Author
Owner

@gsaraf commented on GitHub (Mar 9, 2025):

Leases should be renewed constantly (every 5 seconds) by the heartbeater, so tasks that take longer than 30 seconds can be processed to completion.

Perhaps you are experiencing connection problems with the redis server causing these to fail? This might be visible in the logs.

<!-- gh-comment-id:2708855985 --> @gsaraf commented on GitHub (Mar 9, 2025): Leases should be renewed constantly (every 5 seconds) by the `heartbeater`, so tasks that take longer than 30 seconds can be processed to completion. Perhaps you are experiencing connection problems with the redis server causing these to fail? This might be visible in the logs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2515
No description provided.