Chatwoot: Huge disk usage for logs

Created on 16 Mar 2020  路  3Comments  路  Source: chatwoot/chatwoot

Describe the bug
After a week of uptime on a production website, chatwoot's log directory takes up 25 gigs of storage.

To Reproduce
Steps to reproduce the behavior:

  1. Run chatwoot in a website with many visitors
  2. Wait a week
  3. Watch PostgreSQL crash because there's no available disk space

Expected behavior
Log rotation, maximum (configurable) log size

Bug Critical

All 3 comments

@sony-mathew @sojan-official Could you please look into this?

@niklaskorz Thanks for reporting this. Most of our deployments are on Heroku, so we didn't notice this issue. We will look at this on priority.

@niklaskorz we have released a new version 1.2.3 that addresses this. Debugging this issue made us realize that the log settings in production was set as debug which gives very verbose logs. We have limited the logging to info which is more apt for production. Also by default, the logs are limited to 1 GB and your last shifted log file.

You also have the option to fine-tune logging via following environment variables.
Ref rails docs for the additional log-level options.

# possible values: 'debug', 'info', 'warn', 'error', 'fatal' and 'unknown'
LOG_LEVEL=
# value in megabytes
LOG_SIZE= 1024

let us know if you need find anything else missing.

Was this page helpful?
0 / 5 - 0 ratings