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.