mail_queue taking up 85% of database

Discussion in 'Troubleshooting' started by bennyuk1, Nov 24, 2017.

  1. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    Hi, I noticed I have 7,800 rows in mail_queue table at 280MB, and 74,000 rows in session table at 32MB for total db size of 333MB, which is 94% of whoel db on those 2.

    Is there a way to reduce these or set some sort of retention polivy on these 2 tables?

    I've been through "delete old records" already and that didnt help much.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello,

    1. Please novigate to
    aMember CP -> Configuration -> Setup/Configuration -> E-Mail

    and reduce number of days to store emails in log (Log Outgoing E-Mail Messages for ... days)

    2. Feel free to truncate data in table am_session. You can do it with the following SQL query:
    Code:
    TRUNCATE TABLE am_session;
    You can execute it from phpmyadmin tool, it is usually available in hosting control panel.

    Also you can swicth 'Session Storage' from 'aMember Database' to 'Standard PHP Sessions'
    aMember CP -> Configuration -> Setup/Configuration -> Advanced

    Best Regards.

Share This Page