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.


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.