-
Notifications
You must be signed in to change notification settings - Fork 9.4k
cron_schedule forever increasing in size. Lots of pending jobs never cleared #11002 #13775
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
Conversation
|
Hi @gnuzealot could you review tests that are failed in Travis and adjust your code? |
@ihor-sviziev all checks are passed now |
Note, that this fix will reduce the server load when the cron_schedule table grows unbounded, but does not fix the root cause of #11002 which is the table growing in the first place. |
Hi @gnuzealot , looks like the described issue was fixed in the scope of #12497. Can you check the behavior on the latest 2.2-develop? |
Hi @gnuzealot , I am closing this PR now due to inactivity. |
Reported in #11002 the cron_schedule table can lock up while running multiple update statements against the table. This is due to a high cost query, where a left join is included in the update to ensure uniqueness. Written this way the query forces a full table scan and lock as it is updating a row it must also select. As this table naturally grows in size the cost of the query will keep increasing. This was fixed by removing the left join from the update and doing a separate select query to still ensure that unique job codes will run.