etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Is there anyway to reduce the mysql database size?

Open cenotaph opened this issue 3 years ago • 3 comments

Hi,

I help keep etherpad-lite running for a nonprofit organisation who has depended on it for years. Last year the mysql .ibd file was over 26GB and was filling up the VPS, so we decided to install a fresh empty etherpad-lite installation and move the old pads over to an 'archive' server.

Now, less than a year later, the archive server has filled the disk, with the .ibd file now ballooned to 43GB, despite hardly anyone editing any pads. Something is clearly wrong and we are in a difficult situation trying to keep it going. Is there any known way to clean/reduce the number of rows in the table? We would be OK losing the history of many or all of the pads, but I cannot understand how the key-value system works to determine the latest revisions.

Thanks!

cenotaph avatar Aug 03 '22 12:08 cenotaph

I have noticed that Etherpad seems to be continually adding new sessions to the database. This may be solved in 1.9 according to the changelog. As for now, you could make a script to clean the sessions in the database, which should hopefully free up some space.

matthias4217 avatar Sep 19 '22 14:09 matthias4217

Any guidance on this? It seems impossible to tell what any of these key-value pairs mean, what is a session, what is an edit, etc? Thanks.

cenotaph avatar Sep 19 '22 15:09 cenotaph

It really depends. First you should check if running something like optimize table helps: https://dev.mysql.com/doc/refman/8.0/en/optimize-table.html

Do you have any plugins enabled? Plugins like ep_image_upload can cause additional data to be stored in the db.

The sessionstorage: prefixes contain the data that can be deleted. Make sure you do a backup first.

webzwo0i avatar Sep 19 '22 15:09 webzwo0i

Should be fixed in 1.9.0, see how you get on.

JohnMcLear avatar Jun 21 '23 10:06 JohnMcLear