Hello all ;-)
I've a client who runs pretty busy website on MODX 2.3.x.
modSession table is like 140k records/2+GB of data, sessions are cleaned up after 24 hrs (this is via server setting. MODX setting does not work - and the admins probably won't let it ;-) )
The website runs pretty ok, but the admins complain database is bit big (its dedicated machine)
I'm thinking of two solutions:
1. Switch to default PHP session handler (file based)? Have never tried before, and with that busy website I'm bit afraid.
2. Drop and recreate table (to free disk space, it's InnoDB). Then create two snippets run from cron (hopefully ;-) )
a) every hour: deletes entries older than 4-6 hrs in chunks of 1000 rows. This probably should be much faster with smaller table and not so many outdated entries.
b) every 24 hours: creates an empty copy of modx_session table, (probably inserts records not older than say an hour), then drops the old one
Maybe it's better if I switched back to MyISAM (we have no idea why it is InnoDB now)?
What do you think?