-
Notifications
You must be signed in to change notification settings - Fork 345
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
cliupdate sempahore locker #967
Comments
Yes I had done that in #597 but this was not merged. |
What are the merits of locking, compared to |
I think file locker will not do useless query, is upper in application level. This can prevent process and memory bombing from cron zombie/defunct processes. |
I have originally intended to update the items in the races (hence the |
from ~111 619 to ~67 562 entries. |
Same error this morning, multiple process cliupdate performs many sql queries (which are denied from the unique key). |
I think that any running update should make another one exit immediately to prevent both sources hammering and rogue processes. There are multiple ways of implementing this, I have proposed using file locks, another way would be to use unix sockets (not portable) or the database. I'll simplify my patch and submit a pull request if it has some chance of getting accepted. Otherwise, this issue should be closed. |
One might also argue that locking should not be a concern of the application and be done on a higher level:
Personally, I am not yet completely sure which level should this be tackled on but since Tobias rejected the original PR, I will side with the higher level solution. |
After several months of use, the use of:
did the trick. No more zombie process. I can submit a pull request, what do you think? |
@alexalouit Sure, we could use it. |
see #991 Works perfectly since months (~120 000 items, ~470 sources). |
Hi,
I found a issue (in my opinion).
Yesterday, my database was in trouble with many connections and simultaneous writings.
I noticed that there were ~30 cron processes (cliupdate) running.
I think a semaphore would have to be set up to prevent this.
The text was updated successfully, but these errors were encountered: