Skip to content

Magento 2.3.3 Cronjob use too much CPU source #25634

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

Closed
Yuwei9291 opened this issue Nov 18, 2019 · 14 comments
Closed

Magento 2.3.3 Cronjob use too much CPU source #25634

Yuwei9291 opened this issue Nov 18, 2019 · 14 comments
Assignees
Labels
Component: Cron Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Progress: PR in progress Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Triage: Performance

Comments

@Yuwei9291
Copy link

Yuwei9291 commented Nov 18, 2019

Preconditions (*)

1.nginx, mysql5.6, php7.3, composer install magento 2.3.3
2.finish all the settings and set 3 cronjobs following the official document.

Steps to reproduce (*)

1.use top command to monitoring the task cpu usage.
2.run php bin/magento cron:run and check the cpu usage.

Expected result (*)

  1. Smooth CPU usage, dose not cause the long time loading.

Actual result (*)

  1. long loading time because of the high CPU usage(Clean Magento 2.3.2: 1s
    Clean Magento 2.3.3: 3.5s)
    20191118192805

CPU usage record by panel
微信截图_20191118191411
CPU usage

@m2-assistant
Copy link

m2-assistant bot commented Nov 18, 2019

Hi @Yuwei9291. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@Yuwei9291 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 18, 2019
@Yuwei9291
Copy link
Author

微信截图_20191119133238
CPU Monitoring info

@jorgb90
Copy link

jorgb90 commented Nov 19, 2019

Same issue here #25593

@engcom-Charlie engcom-Charlie self-assigned this Nov 19, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2019

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Charlie engcom-Charlie added Component: Cron Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 19, 2019
@ghost ghost unassigned engcom-Charlie Nov 19, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-28949 were created

Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 19, 2019
@interequipment
Copy link

Having same issue. (upgraded from 2.3.1 to 2.3.3)

@Jilco
Copy link

Jilco commented Jan 10, 2020

Is there a solution or work around? My CPU stays at 100%...

@atastycookie
Copy link

atastycookie commented Jan 15, 2020

Hello,

Any updates or workarounds? Our "load average" is ~40.6 on the clean installations

@Jilco
Copy link

Jilco commented Jan 15, 2020

Update, i was google "attacking" my site for some reason, they indexed 159.000 pages a day at once...

Adjusting robots.txt to index less was the sollution

@vincentteyssier
Copy link

Hi, when you run di:compile the cache gets disabled somehow.
Even if cache management shows green in the admin panel, it is set to 0 in the back end.
Run php bin/magento cache:enable and cron will run with same performances as 2.3.2

@XstraAI
Copy link

XstraAI commented Jan 24, 2020

Had a similar issue and tracked it down to an AJAX Layered Navigation module. Disabling the module resolved the issue.

@roni-sooryen
Copy link

Seems like this issue is able to fix this problem #26507

@sdzhepa sdzhepa added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Triage: Performance labels Jul 16, 2020
@VladimirZaets VladimirZaets added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 24, 2020
@VladimirZaets VladimirZaets added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Jul 24, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: ready for dev labels Sep 24, 2020
@driskell
Copy link
Contributor

#28007 can help with high CPU as it removes some deadlocks that prevent cron schedule table from being cleaned. It can also fix things stuck in running status.

@driskell driskell removed their assignment Sep 24, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Sep 24, 2020
@ghost ghost added Progress: PR in progress and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Cron Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Progress: PR in progress Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Triage: Performance
Projects
Status: Pull Request In Progress
Development

No branches or pull requests