-
Notifications
You must be signed in to change notification settings - Fork 132
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
Increase Queue maxworkers to 2 #2965
base: dev
Are you sure you want to change the base?
Conversation
When we start running a worker, it actually takes one or two seconds for the worker to effectively start. Because of this, when we try to run the next worker, the previous worker is still working and we cannot run the new one. To prevent this, we need to allow an additional worker to run, just to transition between the old and new worker.
When I implemented the background job thing, I assumed that only one worker would run at the same time, so I am afraid having two workers will cause some race condition. We’d need to review the code to make sure it’s fine. I think it would be safer, for now, to lower the value of I changed the server configuration that way, but this is just a temporary fix. I think allowing more than one worker is a better way to solve the problem. |
Re: https://tatoeba.org/en/audio/import While most of the time, this has been much better, in my most-recent attempt to import a file for the following sentence, it took over 7 minutes. Maybe much longer, it still hasn't uploaded at the time of this message. If this now has an audio file, it did eventually get added. https://tatoeba.org/en/sentences/show/10962424 07:35 |
Re: https://tatoeba.org/en/audio/import My most-recent attempt to import files took over 8 minutes. If the following now has an audio file, they did eventually get added. https://tatoeba.org/en/sentences/show/11062081 22:35 |
Just to let you know that the previous import did finally complete. 01:19 |
This is still happening. 18:37 So, it is a persistent problem. |
@ckjpn The problem reappeared because we updated Tatoeba this weekend, and this erased the temporary fix that gillux did. I've re-applied the fix just now so it should be fine again. |
CK reported that it sometimes took several minutes (up to 19 minutes) to import audio (see #2955 (comment)).
I noticed that when we run a worker, even if the
runworker
command is executed at 0 second, thecreated
date is at 1 second and sometimes at 2 seconds.Example:
Because of this, when the worker is terminated (after 20 minutes in our case) and we try to run the next worker, it fails because the previous worker is still running and we end up with no workers at all.
As a result, I have updated the config on prod to increase the maximum number of workers to 2. Not sure if there's a better solution.