Knowledgebase

Handling Too Many Connections Print

  • databasesphpmyadmin, databases, caching, database, performance, troubleshooting, guide, howto
  • 0

Connection limits reached.

WHAT IT MEANS

The limit on simultaneous connections was reached, and new ones are refused.

THE CAUSES

An application opening connections without closing them Several sites on one account competing A traffic spike Slow queries holding connections open longer than necessary

IMMEDIATE RELIEF

The condition frequently clears as connections time out.

If it persists, something is leaking.

THE UNDERLYING FIXES

Enable caching, so far fewer requests reach the database at all Fix slow queries, which release connections sooner Check for code opening connections in a loop

WITH SEVERAL SITES

Each holds connections. Several busy sites reach the limit collectively even when none is individually unreasonable.

CACHING IS THE MAIN ANSWER

A cached page uses no database connection. That is the difference between every visitor consuming one and almost none doing so.

WHAT TO SEND US

The time, how many applications are on the account, and whether it coincides with a traffic spike.

We can see connection counts from the server side.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot