Skip to content
Databases2 min read

Fix MySQL 1203: already has more than max_user_connections

ERROR 1203 (42000): User cpuser_shop already has more than 'max_user_connections' active connections

Short answer

Error 1203 means a database user reached its maximum number of simultaneous connections (max_user_connections). The server is fine, but your site opens connections faster than it closes them; the fix is closing connections, avoiding persistent ones and sending fewer requests to the database.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Causes
  2. How to fix it
  3. Prevention
  4. On ArabyHost

Unlike error 1040, which concerns the whole server, 1203 concerns one user. On shared hosting each account gets its own connection limit so that one site can’t take every connection on the server. In PHP the message reads:

SQLSTATE[42000] [1203] User cpuser_shop already has more than 'max_user_connections' active connections

Causes

  • Many simultaneous uncached requests: every PHP request opens a connection. On WordPress, admin-ajax.php, Heartbeat and WP-Cron add to the count.
  • Slow queries that hold connections longer.
  • Persistent connections that stay open after the request ends.
  • Background workers: each Laravel queue worker holds a connection, and each Node.js pool opens several.
  • Several sites in the same account sharing one database user.
  • Code that opens a new connection inside a loop instead of reusing one.

How to fix it

  1. Find what’s holding connections, in phpMyAdmin’s SQL tab:
SHOW PROCESSLIST;

Note the number of rows, the Sleep state (an idle open connection), and the Time column (seconds the query has been running).

  1. End stuck queries belonging to your user, using the number in the Id column:
KILL 12345;
  1. Turn off persistent connections in your code:
$pdo = new PDO($dsn, $user, $pass, [PDO::ATTR_PERSISTENT => false]);
  1. Use one small pool in Node.js for the whole app, not a connection per request:
const pool = mysql.createPool({
  host: 'localhost',
  user: 'cpuser_app',
  password: process.env.DB_PASSWORD,
  database: 'cpuser_app',
  connectionLimit: 5,
});
  1. Count your Laravel workers. Each running php artisan queue:work holds a connection, so don’t run more workers than you need.

  2. Lighten WordPress: enable LiteSpeed Cache, slow down Heartbeat, and replace WP-Cron with a real cron job, as in the cron jobs guide and WP-Cron not working.

  3. Separate the users: give each site in the account its own database user, so you can see which one is using the connections.

Prevention

  • Close the connection when long scripts finish their work.
  • Index the columns used in WHERE so queries finish quickly.
  • Check SHOW PROCESSLIST after installing any new plugin or feature.

On ArabyHost

Every ArabyHost account has a limit on simultaneous database connections, alongside its other resource limits (LVE). So close connections when you’re done and avoid persistent connections. On AI/Developer plans, background workers are kept alive with cron, so give each worker a small pool. The Araby AI assistant reads your error log and shows when the error happens and where it comes from. If your site genuinely needs more connections after these steps, contact us to review which plan fits.

FAQ

Does this error mean my hosting is down?

No. The server is running, but your site opened more simultaneous connections than the user's limit allows. As soon as some close, new connections work again.

What pool size should a Node.js app use on shared hosting?

Keep it small and use one pool for the whole app. A few connections are usually enough because each fast query returns its connection to the pool; a large pool just burns through the user's limit.

Why does it happen when traffic is low?

Usually cron jobs, crawlers or background workers running at the same moment. Run SHOW PROCESSLIST when the error appears and review your cron schedule.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.