Glossary

Database connection limit

What is a database connection limit?

In short

A database connection limit, max_connections in MySQL and PostgreSQL, caps how many clients can be connected at once. Past it, new connections are refused.

Why it matters

Apps then fail with “Too many connections”, often during a traffic spike or after a bug that leaks connections. Raising the limit costs memory, so the real fix is usually connection pooling or closing idle connections.

How to check it on Linux

MySQL: connections in use against the limit:

mysql -e "SHOW STATUS LIKE 'Threads_connected'; SHOW VARIABLES LIKE 'max_connections';"

What Opservo does about it

Opservo tracks MySQL connection use per instance as a percentage of the limit. Metrics Opservo collects

Database connection limit, answered

What is a database connection limit?+

A database connection limit, max_connections in MySQL and PostgreSQL, caps how many clients can be connected at once. Past it, new connections are refused.

How do I check a database connection limit on Linux?+

MySQL: connections in use against the limit: mysql -e "SHOW STATUS LIKE 'Threads_connected'; SHOW VARIABLES LIKE 'max_connections';"

How does Opservo handle a database connection limit?+

Opservo tracks MySQL connection use per instance as a percentage of the limit.

Related terms

Opservo watches all of this on every server and explains problems in plain English. Free for 2 servers.