Skip to content

system.log rapidly increasing after Magento CE 2.2.5 update (cron logs) #17190

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
mad-develop opened this issue Jul 27, 2018 · 7 comments
Closed
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue

Comments

@mad-develop
Copy link

mad-develop commented Jul 27, 2018

system.log is increasing rapidly after Magento CE 2.2.5 update with the added cron info logs.
Cronjob is runs every minute, so after one day i have about 5MB system.log size. This seems a little too much.

The logging is not bad, but in Production mode several logs every minute, that the cronjob has run successful seems a bit unnecessary.

A solution could be to make Loglevel of system.log configurable or change the log-level from info to debug.

Related:
https://github.com/magento/magento2/blob/2.2.5/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php#L313

system.log:

[2018-07-27 10:43:02] main.INFO: Cron Job catalog_product_outdated_price_values_cleanup is run [] []
[2018-07-27 10:43:02] main.INFO: Cron Job catalog_product_outdated_price_values_cleanup is successfully finished. Statistics: {"sum":0.10062503814697,"count":1,"realmem":0,"emalloc":3162464,"realmem_start":52428800,"emalloc_start":140877
52} [] []

[... (more cron job lines) ...]

[2018-07-27 10:44:02] main.INFO: Cron Job catalog_product_frontend_actions_flush is run [] []
[2018-07-27 10:44:02] main.INFO: Cron Job catalog_product_frontend_actions_flush is successfully finished. Statistics: {"sum":0.00043821334838867,"count":1,"realmem":0,"emalloc":752,"realmem_start":52428800,"emalloc_start":17237376} [] [
]

Preconditions

  1. Magento CE 2.2.5

Steps to reproduce

  1. Install Magento
  2. Setup Cron-Jobs (bin/magento cron:setup)
  3. Set deploy mode to production

Expected result

  1. Get a usable system.log

Actual result

  1. After one day, the system.log has already several MB filesize.
@magento-engcom-team
Copy link
Contributor

Hi @mad-develop. 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-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@mad-develop do you confirm that you was 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 Jul 27, 2018
@ghost ghost self-assigned this Jul 27, 2018
@ghost
Copy link

ghost commented Jul 27, 2018

@mad-develop, this is not a bug.

@ghost ghost closed this as completed Jul 27, 2018
@ghost ghost added the non-issue label Jul 27, 2018
@mad-develop
Copy link
Author

mad-develop commented Jul 27, 2018

@engcom-backlog-pb
yeah its not a bug, but definitly needs improvement.
after a month, the log would have >150MB only with successful cron logs...

I don't know how long your shops are running, but these logs in production mode seems excessive. And there are separate log files that are empty and never gets filled (magento.cron.log, update.cron ...)

Seems i have to write my own system logger to avoid this "feature". But its a ugly solution, just because there is no configuration possible for system logging.

Now I'm sad. :(

@hostep
Copy link
Contributor

hostep commented Jul 27, 2018

I agree with @mad-develop that this behavior is very annoying to say the least.
But @engcom-backlog-pb is also correct in that it is strictly not a bug. It would however be nicer if some extra context was given instead of a measly 5 word reply.

Anyway, since this is not strictly a bug, we can consider it as a feature request, so @mad-develop, if you want you can open a feature request over here to improve this functionality: https://github.com/magento/community-features/issues or send in a PR to this repo with suggested improvements.

@mad-develop
Copy link
Author

Thanks @hostep for your help. I've seen there is already a pull request for logging configuration #12349.
Maybe my problems will be solved in the near future.

@slavvka
Copy link
Member

slavvka commented Oct 3, 2018

Hi @mad-develop. Thank you for your report.
The issue has been fixed in #18209 by @hostep in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@slavvka slavvka added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 3, 2018
@magento-engcom-team
Copy link
Contributor

Hi @mad-develop. Thank you for your report.
The issue has been fixed in #18389 by @hostep in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 9, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue
Projects
None yet
Development

No branches or pull requests

4 participants