mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #799] [BUG] Lease expiration occasionally occurs when dealing with extremely long tasks,log >>> asynq: task lease expired #393
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#393
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wenlng on GitHub (Dec 30, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/799
Originally assigned to: @hibiken on GitHub.
When dealing with a very long task, the lease will occasionally expire, resulting in the task being canceled before it is completed, context canceled
To Reproduce
taskInfo, err := asynqClient.Enqueue(
asynq.NewTask("SyncDataTask", payload),
asynq.Timeout(time.Second*3600), // The timeout period of the task is set to 1 hour
)
Expected behavior
The task takes about half an hour to complete, after several tests, in the process of processing occasionally occurs asynq: task lease expired, resulting in the task is terminated, hope the author pay attention to this problem, thank you!
Screenshots
...
Environment (please complete the following information):
asynqpackage v0.24.1Additional context
....
@alipeng commented on GitHub (Dec 31, 2023):
Maybe you should check your redis first.
redis-cli info | grep memory_human. I also encountered the same problem. Finally, I checked and found that it was a redis problem. It's redismaxmemory-policy"volatile-lru"@justding commented on GitHub (Jan 24, 2024):
in processor func exe() { msg, leaseExpirationTime, err := p.broker.Dequeue(qnames...)}