mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #1051] [BUG] Tasks stuck in active state #1515
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#1515
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 @asadzeynal on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/hibiken/asynq/issues/1051
Originally assigned to: @hibiken, @kamikazechaser on GitHub.
Describe the bug
Tasks are accumulating over time in the active queue and never get processed. It seems like they accumulate in batches. Last time an increase of stale tasks happened (>1000), it happened during Redis failure under high load. We had a problem, which resulted in 40k tasks failing in a matter of seconds, redis started to return TOO_MANY_REQUESTS and other errors.
After that, the number of active tasks in queue increased forever (It is not the first time this happens).
The stuck tasks are completed in reality, just not deleted from the active queue. Also, they do not have corresponding entries in lease.
Environment (please complete the following information):
To Reproduce
Not sure how to reproduce this behavior. Maybe stress redis until it starts returning TOO_MANY_REQUESTS might help, because this are the conditions under which it happened for us.
Screenshots



@kamikazechaser commented on GitHub (May 22, 2025):
Could you mention where and how redis is hosted?
@Mdhesari commented on GitHub (Aug 18, 2025):
@asadzeynal please check this out and help me complete:
https://github.com/Mdhesari/asynq-issue-reproduction
here's the similar repduction of your issue, please take a look, I have used ai for faster reproduction after different kinds of prompts...
@Ning-Qing commented on GitHub (Dec 26, 2025):
I've also encountered the same problem. May I ask if there are any solutions
@Ning-Qing commented on GitHub (Dec 26, 2025):
@kamikazechaser help