My Magento website has a separate web server and the database server is different (so basically it's a remote connection). I have a test site as well that has a separate database on same remote database server. Oftentimes I see database disconnection issue in my main Magento store, however my test site works smoothly. What's the issue?
I see Cloudflare error 524 most of the times and when I restart the database server I get "Connection failed: SQLSTATE[HY000] [2002] Connection refused"
After some time, everything starts working fine on it's own. I get any reports in var/Log files.
1 Answer 1
Most likely there are too many open connections between the web and database servers.
These connections (keep-alive PDO) are usually cached in the session data, so you wouldn't notice it for a development site with only minimal activity... but it would greatly affect the total number of customers able to connect at the same time.
-
I see. So what's the solution for the issue?.Mohit Singh– Mohit Singh2016年11月19日 07:01:23 +00:00Commented Nov 19, 2016 at 7:01
-
The easiest is to just restart the MySQL server. See dev.mysql.com/doc/refman/5.5/en/too-many-connections.html. Or if you have permission, you can use
SHOW PROCESSLISTto view all connections, andKILLthe process ID's you want to kill.Phil M– Phil M2017年12月19日 18:35:26 +00:00Commented Dec 19, 2017 at 18:35