On shared hosting the database user's connection quota is enforced per account, so a traffic spike or a second site on the same credentials exhausts it while the database server itself stays healthy.
On shared hosting the database user's connection quota is enforced per account, so a traffic spike or a second site on the same credentials exhausts it while the database server itself stays healthy.
Enable a persistent object cache (Redis or Memcached) to collapse repeated queries, give each site its own database user, and set WP_MEMORY_LIMIT explicitly. Check the host's control panel for a connections-per-user cap before raising anything server-side.
WordPress has its own failure mode, but Error establishing a database connection has a wider set of causes. The most common one overall is: The database server is down or out of memory.
Check the database service status and its error log. An out-of-memory kill on a small VPS is the classic cause of an intermittent version of this error.
An external probe records whether the failure is constant or intermittent, and captures the exact minutes it occurs — which is what distinguishes wrong credentials from connection exhaustion.
On shared hosting the database user's connection quota is enforced per account, so a traffic spike or a second site on the same credentials exhausts it while the database server itself stays healthy.
Enable a persistent object cache (Redis or Memcached) to collapse repeated queries, give each site its own database user, and set WP_MEMORY_LIMIT explicitly. Check the host's control panel for a connections-per-user cap before raising anything server-side.
WordPress loaded but could not connect to MySQL. Either the credentials in wp-config.php are wrong, the database server is down, or connections are exhausted under load.