Last 2 builds causing EC2 instance to overload RAM
I'm assuming it's a RAM issue. I've used EC2 for years with no issues but starting about 3 releases ago I've had to check my sendy website often to make sure it's still functioning.
Current release: Version 7.1.3
The error is always "Can't connect to database server".
I reboot EC2 instance and all is good again.
I've been installing the latest version the moment they come out hoping to stop having to constantly check the server.
Any ideas, besides loading a ton of RAM for Sendy?
This discussion has been closed.
Comments
Hi,
This may be related to your MySQL server's max_connections limit or connection timeout settings being too low for the number of concurrent connections Sendy opens during a send.
To check and raise max_connections, log into MySQL and run:
SHOW VARIABLES LIKE 'max_connections';If it's at or near MySQL's default of 151, raise it with:
SET GLOBAL max_connections = 300;To make this persist after a restart, add this to your my.cnf (usually at /etc/mysql/my.cnf or /etc/my.cnf) under the [mysqld] section:
max_connections = 300To check wait_timeout, run:
SHOW VARIABLES LIKE 'wait_timeout';MySQL's default is 28800 seconds (8 hours), which is usually enough, but if it's been lowered you can raise it with:
SET GLOBAL wait_timeout = 600;And persist it in my.cnf under [mysqld]:
wait_timeout = 600300 connections and a 600 second wait_timeout should be enough headroom for a typical Sendy send. If the errors continue after that, it's worth monitoring MySQL's actual connection count during a send (
SHOW STATUS LIKE 'Threads_connected';) to see how close he's getting to the new limit.Best regards,
Ben