-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] asynq client failed when use command stats
#309
Comments
stats
stats
Hello, I have encoutered this problem as well, but using Probably the MEMORY USAGE command is returning nil and since we dont handle it we get this error message. I will investigate it. |
@duyhungtnn thank you for reporting this! Could you double check the CLI version by running |
The error message in the screenshot is coming from here: Line 197 in 95c90a5
My initial guess is that the for loop for the scan command is taking too long ( Line 183 in 95c90a5
Since redis only executes one command at a time, since other clients are sending commands to redis while this for loop is executing scan commands to collect all keys, keys may have been deleted (i.e. task processed successfully), you'll see the key not found error when memeorUsage command is invoked.
If this above analysis is correct, then we should make this operation into a Lua script and run the script with EXECUTE so that all of this operation becomes atomic (i.e. other clients commands won't be executing between multiple calls to scan and memoryusage). But now that we can have a lot more redis-keys than before (each task has its own key), maybe getting memory usage within a short timeframe is not feasible anymore. |
@hibiken yeah my asynq is @crossworth I am facing that issue with |
@duyhungtnn The fix is in 👍 |
Describe the bug
asynq stats
. It take so long to complete and end up withTo Reproduce
Steps to reproduce the behavior (Code snippets if applicable):
0. Setup redis with docker-compose
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
asynq
package [v0.18.2]Additional context
The worker and scheduler work as normal
The data on Redis is okay too
The text was updated successfully, but these errors were encountered: