{"data":{"id":"magento2-32690","source":"github-pr","sourceRef":"magento/magento2#32690","title":"Improve cron error logging","pr":{"number":32690,"url":"https://github.com/magento/magento2/pull/32690","author":"fredden","mergedAt":"2024-12-21T01:10:09Z","mergeCommit":"a69199d60cdceefca436751ad0d08693a626ba67","headCommit":"37d148156f90f3f8d0568d0a8490db78fb111c0e","baseRef":"2.4-develop","diffSha256":"78dc7520b41b538daa0bc8a1b46ffeb15e60a49fffcc96e69f49c40ae180dc5b"},"issues":[{"number":37453,"url":"https://github.com/magento/magento2/issues/37453","title":"[Issue] Improve cron error logging","labels":["Area: Framework","Component: Cron","Component: Shell","Issue: Confirmed","Priority: P3","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x"],"kind":"pr-derived"}],"fixedIn":"2.4.8","containingTags":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5","2.4.9"],"reportedOn":null,"codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10"],"components":["magento/module-cron"],"files":[{"path":"app/code/Magento/Cron/Console/Command/CronCommand.php","change":"modified","package":"magento/module-cron"},{"path":"app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php","change":"modified","package":"magento/module-cron"},{"path":"app/code/Magento/Cron/Shell/CommandRendererBackground.php","change":"added","package":"magento/module-cron"},{"path":"app/code/Magento/Cron/etc/di.xml","change":"modified","package":"magento/module-cron"}],"stripped":{"tests":["app/code/Magento/Cron/Test/Unit/Console/Command/CronCommandTest.php","app/code/Magento/Cron/Test/Unit/Shell/CommandRendererBackgroundTest.php"],"docs":[],"outsideCode":["app/etc/di.xml"]},"linesChanged":84,"mergeBatched":false,"excluded":null,"sections":{"description":"This pull request improves logging of errors within cron processes.","stepsToReproduce":"1. Artificially introduce a memory leak into a cron job, eg `indexer_reindex_all_invalid`\n1. Run `php bin/magento cron:run` without these changes\n1. Observe lack of information about the failure\n1. Run `php bin/magento cron:run` with these changes\n1. Observe information available in `var/log` (in this example, `var/log/magento.cron.index.log`)","expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":["Framework"],"component":["Cron","Shell"],"priority":"P3","severity":null,"reportedOn":["2.4.x"]},"categories":["Cron"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"6f796aaf4590d5ec3310d638d6070071cae8381e3fff91c225369f40525d178a","isBugfix":0.4337,"changeKind":{"choice":"feature","probabilities":{"bugfix":0.4047,"feature":0.4984,"refactor":0.0499,"tests_only":0.0125,"docs_only":0.0046,"dependency":0.0055,"cleanup":0.0244},"confidence":0.318},"scope":{"score":1.26,"probabilities":{"0":0.2027,"1":0.3346,"2":0.4627},"confidence":0.0507},"risk":{"score":0.5361,"probabilities":{"0":0.5459,"1":0.3721,"2":0.082},"confidence":0.1648},"area":{"choice":"framework","probabilities":{"catalog":0.0039,"checkout":0.0034,"customer":0.0033,"admin":0.008,"graphql_api":0.0026,"framework":0.9655,"frontend":0.0037,"other":0.0096},"confidence":0.9226},"securityRelevant":0.0087,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0053,"2.4.0-p1":0.0052,"2.4.1":0.0052,"2.4.1-p1":0.005,"2.4.2":0.0068,"2.4.2-p1":0.0076,"2.4.2-p2":0.0083,"2.4.3":0.0112,"2.4.3-p1":0.0125,"2.4.3-p2":0.0128,"2.4.3-p3":0.0075,"2.4.4":0.0247,"2.4.4-p1":0.0108,"2.4.4-p10":0.0083,"2.4.4-p11":0.0103,"2.4.4-p12":0.0091,"2.4.4-p13":0.0087,"2.4.4-p14":0.0126,"2.4.4-p15":0.0083,"2.4.4-p16":0.0092,"2.4.4-p17":0.0072,"2.4.4-p18":0.007,"2.4.4-p2":0.0035,"2.4.4-p3":0.0042,"2.4.4-p4":0.0043,"2.4.4-p5":0.0056,"2.4.4-p6":0.0054,"2.4.4-p7":0.0062,"2.4.4-p8":0.0068,"2.4.4-p9":0.0055,"2.4.5":0.017,"2.4.5-p1":0.0113,"2.4.5-p10":0.0078,"2.4.5-p11":0.0127,"2.4.5-p12":0.0102,"2.4.5-p13":0.0103,"2.4.5-p14":0.01,"2.4.5-p15":0.008,"2.4.5-p16":0.0081,"2.4.5-p17":0.0069,"2.4.5-p2":0.0037,"2.4.5-p3":0.0045,"2.4.5-p4":0.0059,"2.4.5-p5":0.0053,"2.4.5-p6":0.0058,"2.4.5-p7":0.0059,"2.4.5-p8":0.0047,"2.4.5-p9":0.0042,"2.4.6":0.0345,"2.4.6-p1":0.0188,"2.4.6-p10":0.0095,"2.4.6-p11":0.0117,"2.4.6-p12":0.0127,"2.4.6-p13":0.0109,"2.4.6-p14":0.0133,"2.4.6-p15":0.0092,"2.4.6-p2":0.0051,"2.4.6-p3":0.008,"2.4.6-p4":0.0096,"2.4.6-p5":0.007,"2.4.6-p6":0.0102,"2.4.6-p7":0.008,"2.4.6-p8":0.0067,"2.4.6-p9":0.0057,"2.4.7":0.0188,"2.4.7-p1":0.0112,"2.4.7-p10":0.0092,"2.4.7-p2":0.0074,"2.4.7-p3":0.0129,"2.4.7-p4":0.0137,"2.4.7-p5":0.0121,"2.4.7-p6":0.0139,"2.4.7-p7":0.0118,"2.4.7-p8":0.0087,"2.4.7-p9":0.0059,"2.4.8":0.0175,"2.4.8-p1":0.0117,"2.4.8-p2":0.013,"2.4.8-p3":0.0145,"2.4.8-p4":0.0128,"2.4.8-p5":0.0117,"2.4.9":0.0139,"unspecified":0.211},"confidence":0.0425},"backportWorthy":{"score":1.339,"probabilities":{"0":0.1588,"1":0.3434,"2":0.4978},"confidence":0.0864}},"curated":{"title":"Logs STDERR and STDOUT of cron processes instead of losing them","description":"Any cron group configured to run in a separate process has its STDOUT and STDERR lost, so error messages are not recorded. With the change, Cron Shell CommandRendererBackground.php logs that output to var/log, for example magento.cron.index.log for the index group, and the main cron:run output goes to magento.cron.log.","categories":["Cron"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.7-p10":{"before":"not-runnable","after":"error","adapted":false,"runAt":"2026-10-06T09:29:06.132Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"unit":{"before":"not-runnable","after":"error","runAt":"2026-10-06T09:29:06.132Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-32690 details"}