User has exceeded the max_user_connections resource
Production Risk
HIGH — users are locked out while the limit is exceeded.
Error 1203 (SQLSTATE 42000) is returned when a specific user account has reached the max_user_connections limit — either the global setting or a per-user resource limit set via GRANT. Unlike error 1040 which limits total server connections, 1203 is per-user.
- 1The user account has a MAX_USER_CONNECTIONS resource limit set via ALTER USER or GRANT
- 2The global max_user_connections variable is non-zero and the user has reached it
- 3Connection leaks in the application are exhausting the per-user slot
A user exceeds their per-user connection limit.
-- Check per-user limit: SELECT user, max_user_connections FROM mysql.user WHERE user = 'appuser';
expected output
ERROR 1203 (42000): User appuser already has more than 'max_user_connections' active connections
Fix 1
Increase or remove the per-user connection limit
WHEN When the limit is artificially low for the workload.
-- Remove per-user limit: ALTER USER 'appuser'@'localhost' WITH MAX_USER_CONNECTIONS 0; FLUSH PRIVILEGES; -- Or raise it: ALTER USER 'appuser'@'localhost' WITH MAX_USER_CONNECTIONS 50;
Why this works
Setting MAX_USER_CONNECTIONS to 0 means no per-user limit; the global max_connections limit still applies.
Fix 2
Fix connection leaks in the application
WHEN When connections are not being returned to the pool.
-- Identify all connections from this user: SELECT * FROM information_schema.PROCESSLIST WHERE USER = 'appuser';
Why this works
Use try-with-resources or connection pool management to guarantee connections are closed after use.
MariaDB Server error code 1203 / ER_TOO_MANY_USER_CONNECTIONS
MariaDB ALTER USER Resource Limits ↗Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev