4

I have a Magento 2 site which crashes everytime db.log file gets full. All I need to do to restore the site is to delete db.log file in var/debug/ folder and make the folder writable.

How do I tell Magento not to log into this file again?

9

Use the below command to disable SQL query logging:

bin/magento dev:query-log:disable
3
  • 1
    The command is 100% correct, my question would be: why it was enabled? By DEFAULT it is Disabled! I guess you might also notice slight Performance Improvement after running bin/magento dev:query-log:disable. Seems to me a Dev Enabled it and forget to Disable it... Which is not something that should be done, especially for Production Environments... Sep 27 '18 at 8:41
  • 1
    @PiotrSiejczuk Yes you are right. It is off by default but I can remember that during troubleshooting of customer login problem on the site, we tried different things which includes turning on sql logging. Sep 27 '18 at 15:21
  • @KunsalAjay: In case of such Performance / Troubleshooting situations I would suggest to use (even in trail option) tools like: NewRelic and/or Blackfire.io Sep 28 '18 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.