mikegioia / libremail

IMAP ➝ SQL syncing engine, JavaScript-free email client, and a Kanban-style email client
Other
120 stars 12 forks source link

MySQL server has gone away (error 2006) #128

Closed mixian closed 4 years ago

mixian commented 4 years ago

Hello, I'm here again;) This time for the problem in question.

"MySQL server has gone away (error 2006)"

It appeared at about 50% of the synchronization out of about 6000 total messages.

Do you think it is possible to solve the problem by increasing the value "max_allowed_packet" perhaps to 128Mb or "wait_timeout" and "innodb_log_file_size". What do you advise?

Thanks enormously for your help.

I work with a Ec2 t2.medium 2 Vcpu and 4Gb Ram for webserver and Rds Instance db.t2.small 1 Vcpu and 2Gb Ram

mikegioia commented 4 years ago

This should be handled by the default wait timeout from the config, but if that query isn't working for your RDS database, then I think you would in fact need to run this manually:

SET SESSION wait_timeout = 28800;

The sync app should be set up to ping SQL periodically but I think your wait_timeout might be below the threshold.

mixian commented 4 years ago

good morning mike, today i run the script but at start get me same error. at start of sync INBOX mail.

Schermata 2020-04-02 alle 10 05 10

I setting up the parameter in RDS Server but i have not yet tested why the script does not start stopping at checking the account.

mixian commented 4 years ago

Hi Mike, i have set the parameter "innodb_log_file_size" to 512Mb for testing and after this 6-7 warning the script continue to sync.

mixian commented 4 years ago

Now has completed sync. Great! 6000 messages!