Skip to content

Cronjobs increasing CPU usage and slow queries #26507

Closed
@Zyles

Description

@Zyles

Cronjobs stuck in pending state. CPU usage increasing. Mysql slow queries increasing.

image

Time is 13:28.

Logs filled with:

use magento;
SET timestamp=1579781526;
SELECT GET_LOCK('|CRON_GROUP_default', '5');
# Time: 200123 13:13:06
# User@Host: magento[magento] @ localhost []
# Thread_id: 20330  Schema: magento  QC_hit: No
# Query_time: 2.951003  Lock_time: 0.000000  Rows_sent: 1  Rows_examined: 0
# Rows_affected: 0
SET timestamp=1579781586;

Load goes down after disabling cronjob in crontab:

image

Preconditions (*)

Magento 2.3.3 & 2.4-develop
PHP-FPM 7.2.24

Steps to reproduce (*)

  1. Install Magento
  2. Setup cron jobs
  3. Run store for a week
  4. Break store

Expected result (*)

Normal working store.

Actual result (*)

  1. Increased CPU usage
  2. Increased cronjobs count
  3. Increased slow queries
  4. Slow store

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CronFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.3.3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Triage: Performance

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions