-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
[Redis]When the number of tasks in the queue exceeds 10,000, the speed is slow and errors may occur. #312
Comments
What cases? |
There are 10,000+ download jobs for downloading webpages in the queue and there are 20 workers work at the same time.. |
Excuse me, how first is related with second? TTR always must be integer. |
The first paragraph just wants to emphasize that there are a lot of tasks to be carried out, and there are also many workers working at the same time. This problem hardly occurs because there are too few tasks or too few workers. I added a statement that outputs the content and length of $ttr variable before this line of code, and I got the following output: Further, I added the code: when the $ttr length is 0, it outputs the $payload variable. The result is as follows: |
I personally guess: it is likely that the acquisition of queue messages does not guarantee complete isolation. |
I missed a detail: |
It is also possible that the performance of the operating environment is too bad, causing the mutex to fail. |
related #218 |
What steps will reproduce the problem?
I am using a redis queue.
When the number of tasks in the queue exceeds 10,000, the worker gets the task very slowly, and may also encounter the following error:
The problem comes from here:
https://github.com/yiisoft/yii2-queue/blob/master/src/drivers/redis/Queue.php#L153
The $ttr variable may not be a number in some cases.
What's expected?
Solve the above errors and improve performance.
What do you get instead?
Additional info
The text was updated successfully, but these errors were encountered: