{"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":"1cd2276fbe7a840dd32608b88d706d8cf0615a5d6cc29bde97e6222e0051f197","isBugfix":0.4512,"changeKind":{"choice":"feature","probabilities":{"bugfix":0.45,"feature":0.4589,"refactor":0.0663,"tests_only":0.0133,"docs_only":0.0053,"dependency":0.0062},"confidence":0.3012},"scope":{"score":1.3023,"probabilities":{"0":0.1807,"1":0.3363,"2":0.483},"confidence":0.0686},"risk":{"score":0.5186,"probabilities":{"0":0.5658,"1":0.3498,"2":0.0844},"confidence":0.1744},"area":{"choice":"framework","probabilities":{"catalog":0.004,"checkout":0.0035,"customer":0.0034,"admin":0.0076,"graphql_api":0.0028,"framework":0.9636,"frontend":0.0039,"other":0.0112},"confidence":0.9186},"securityRelevant":0.0091,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0056,"2.4.0-p1":0.0058,"2.4.1":0.0051,"2.4.1-p1":0.005,"2.4.2":0.0075,"2.4.2-p1":0.0067,"2.4.2-p2":0.0088,"2.4.3":0.0151,"2.4.3-p1":0.0136,"2.4.3-p2":0.0155,"2.4.3-p3":0.0085,"2.4.4":0.0201,"2.4.4-p1":0.0115,"2.4.4-p10":0.0084,"2.4.4-p11":0.0105,"2.4.4-p12":0.0094,"2.4.4-p13":0.0085,"2.4.4-p14":0.0108,"2.4.4-p15":0.0077,"2.4.4-p16":0.0087,"2.4.4-p17":0.0076,"2.4.4-p18":0.0069,"2.4.4-p2":0.0039,"2.4.4-p3":0.0047,"2.4.4-p4":0.0047,"2.4.4-p5":0.006,"2.4.4-p6":0.0055,"2.4.4-p7":0.006,"2.4.4-p8":0.0066,"2.4.4-p9":0.0053,"2.4.5":0.0168,"2.4.5-p1":0.0131,"2.4.5-p10":0.0079,"2.4.5-p11":0.0129,"2.4.5-p12":0.0106,"2.4.5-p13":0.0103,"2.4.5-p14":0.0122,"2.4.5-p15":0.0096,"2.4.5-p16":0.0076,"2.4.5-p17":0.0068,"2.4.5-p2":0.0041,"2.4.5-p3":0.0054,"2.4.5-p4":0.0062,"2.4.5-p5":0.0063,"2.4.5-p6":0.007,"2.4.5-p7":0.0063,"2.4.5-p8":0.0054,"2.4.5-p9":0.0052,"2.4.6":0.032,"2.4.6-p1":0.0201,"2.4.6-p10":0.0123,"2.4.6-p11":0.0125,"2.4.6-p12":0.0136,"2.4.6-p13":0.0136,"2.4.6-p14":0.0133,"2.4.6-p15":0.0092,"2.4.6-p2":0.005,"2.4.6-p3":0.0075,"2.4.6-p4":0.01,"2.4.6-p5":0.0069,"2.4.6-p6":0.0103,"2.4.6-p7":0.0081,"2.4.6-p8":0.007,"2.4.6-p9":0.0051,"2.4.7":0.0156,"2.4.7-p1":0.0107,"2.4.7-p10":0.0089,"2.4.7-p2":0.0076,"2.4.7-p3":0.0112,"2.4.7-p4":0.0124,"2.4.7-p5":0.0122,"2.4.7-p6":0.0128,"2.4.7-p7":0.0111,"2.4.7-p8":0.0091,"2.4.7-p9":0.006,"2.4.8":0.0162,"2.4.8-p1":0.0108,"2.4.8-p2":0.012,"2.4.8-p3":0.0124,"2.4.8-p4":0.0114,"2.4.8-p5":0.01,"2.4.9":0.0149,"unspecified":0.2045},"confidence":0.0396},"backportWorthy":{"score":1.3251,"probabilities":{"0":0.1638,"1":0.3473,"2":0.4889},"confidence":0.0797}},"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"}