I a have a windows server on AWS (Lightsail). I have installed MYSQL Server on it. I have multiple websites that connect to the MYSQL server via Localhost. When I use one of the websites after a long period of inactive time and it has to connect to the MYSQL server, I receive the error:
'connection to localhost failed'
What's strange is that it happens only the first time. If I try to connect after that there's no problem. It's like the MYSQL enters in sleep mode, and the first connection wake's it up, and then there is no problem.
I have no idea how I could troubleshoot that. Any ideas?