Hi ! just finishing roudcube db backup via mysqldump, noticed that session table has 105K rows, cache_messeges table about 162K rows. Does rcu database needs some kind of maintenance? I am using rcu about 5 years ago with 30 email acounts.
thanks in advance,
On 08/23/2015 10:14 PM, Luciano Gabriel Andino wrote:
Hi ! just finishing roudcube db backup via mysqldump, noticed that session table has 105K rows, cache_messeges table about 162K rows. Does rcu database needs some kind of maintenance? I am using rcu about 5 years ago with 30 email acounts.
On systems where default PHP session garbage collector is disabled (e.g. Debian) you should run bin/gc.sh script regularly. There's also bin/cleandb.sh script which removes records marked as deleted (e.g. contacts) after specified time from marking them as deleted.
Alec,
On 08/23/2015 10:14 PM, Luciano Gabriel Andino wrote:
Hi ! just finishing roudcube db backup via mysqldump, noticed that session table has 105K rows, cache_messeges table about 162K rows. Does rcu database needs some kind of maintenance? I am using rcu
about
5 years ago with 30 email acounts.
On systems where default PHP session garbage collector is disabled (e.g. Debian) you should run bin/gc.sh script regularly. There's also bin/cleandb.sh script which removes records marked as deleted (e.g. contacts) after specified time from marking them as deleted.
That is not entirelly correct, Debian may has it disabled on php.ini, but it has a cron script that is always enabled by default that cleans sessions
Luciano Gabriel Andino malucosfe@gmail.com wrote:
Hi ! just finishing roudcube db backup via mysqldump, noticed that session table has 105K rows, cache_messeges table about 162K rows. Does rcu database needs some kind of maintenance? I am using rcu about 5 years ago with 30 email acounts.
How about thinking in a different direction: I found it much better to put the IMAP cache and the session data into memcached. Both are composed of volatile data and fit the memcached usage model quite nice.
This has the benefit of being faster (because memcached does not need to flush data to a storage medium) and is auto-cleaning.
Sizing hints for memcached: My roundcube is used by 10.000 users and I put both the IMAP index cache (message cache is disabled) and the sessions into memcached and the max. memory usage has been 21MBytes.
Most distributions configure memcached with 64MB as default size which would be more than enough for you.
Grüße, Sven.
On 8/24/2015 1:47 AM, A.L.E.C wrote:
On 08/23/2015 10:14 PM, Luciano Gabriel Andino wrote:
Hi ! just finishing roudcube db backup via mysqldump, noticed that session table has 105K rows, cache_messeges table about 162K rows. Does rcu database needs some kind of maintenance? I am using rcu about 5 years ago with 30 email acounts.
On systems where default PHP session garbage collector is disabled (e.g. Debian) you should run bin/gc.sh script regularly. There's also bin/cleandb.sh script which removes records marked as deleted (e.g. contacts) after specified time from marking them as deleted.
A.L.E.C.,
When I run bin/gc.sh I get no output (which I suppose is not a bad default setting for a cron script) and no change to the session table in my Roundcube database. Is this the right script for that task and is there anything special I need to do when running it?
I'm using Roundcube 1.1.2.
Thanks.
On 08/30/2015 06:03 AM, deoren wrote:
When I run bin/gc.sh I get no output (which I suppose is not a bad default setting for a cron script) and no change to the session table in my Roundcube database. Is this the right script for that task and is there anything special I need to do when running it?
I'm using Roundcube 1.1.2.
I just noticed it cleans only caches and temp directory, but not session table. We'd need to extend the script, the query would be something like:
DELETE FROM session WHERE changed < NOW() - INTERVAL 1 DAY;
but depending on Roundcube session_lifetime setting.
On 8/30/2015 1:36 AM, A.L.E.C wrote:
On 08/30/2015 06:03 AM, deoren wrote:
When I run bin/gc.sh I get no output (which I suppose is not a bad default setting for a cron script) and no change to the session table in my Roundcube database. Is this the right script for that task and is there anything special I need to do when running it?
I'm using Roundcube 1.1.2.
I just noticed it cleans only caches and temp directory, but not session table. We'd need to extend the script, the query would be something like:
DELETE FROM session WHERE changed < NOW() - INTERVAL 1 DAY;
but depending on Roundcube session_lifetime setting.
I was going to ask if you'd like me to submit a bug report or enhancement request, but I see you've already done so:
http://trac.roundcube.net/ticket/1490512
Thanks!