Articles in this section

Log Browser database take too much space in Plesk

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Log Browser database size in /usr/local/psa/var/modules/log-browser/log-browser.sqlite3 is quite big, producing server disk to run out free space and the server goes down.

  • The Log Browser database contains a lot of mail data.

  • The server manage a lot of emails per day:

    # grep "$(date '+%b %d')" /var/log/maillog* | wc -l
    6129

Cause

The Log Browser database store 30 days of data and grows due to the email traffic on the server.

Resolution

  1. Connect to the server via SSH

  2. Run the following command to truncate database to last 15 days and free space in disk:

    # sqlite3 /usr/local/psa/var/modules/log-browser/log-browser.sqlite3
    DELETE FROM Mail WHERE id IN (
    SELECT DISTINCT mailId FROM MailEvents WHERE timestamp < strftime('%s', 'now', '-15 days')
    );
    VACUUM;

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.