Skip to content
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

cron_schedule forever increasing in size. Lots of pending jobs never cleared #11002 #13775

Closed
wants to merge 7 commits into from

Conversation

gnuzealot
Copy link

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.

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Feb 21, 2018

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Feb 22, 2018

Hi @gnuzealot could you review tests that are failed in Travis and adjust your code?

@gnuzealot
Copy link
Author

@ihor-sviziev all checks are passed now

@gwharton
Copy link
Contributor

gwharton commented Mar 3, 2018

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.

@sidolov sidolov self-assigned this Mar 19, 2018
@ihor-sviziev ihor-sviziev requested review from sidolov and removed request for ihor-sviziev June 5, 2018 08:37
@ihor-sviziev ihor-sviziev removed their assignment Jun 5, 2018
@sidolov
Copy link
Contributor

sidolov commented Aug 8, 2018

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?
Thank you!

@sidolov
Copy link
Contributor

sidolov commented Aug 23, 2018

Hi @gnuzealot , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants