For anyone running MySQL on an m7i.24xlarge instance, what value does `SHOW GLOBAL VARIABLES LIKE 'max_connections';` return for you? Mine consistently shows 16,000, and I'm trying to understand whether that is the expected default or if it should be adjusted through parameter or database settings.
3 Answers
An m7i.24xlarge has roughly 192 GiB of memory, which lines up with a calculated limit of around 16,000 connections. So seeing 16,000 is expected. That said, lots of short-lived connections can start causing performance problems somewhere around 22,000–24,000, even if the configured maximum is higher.
At this scale, using a connection pool or database proxy is strongly recommended. It keeps applications from constantly creating and closing connections and can help avoid the overhead and instability that come with very high concurrent connection counts.
The default connection limit is based largely on the instance’s available memory, but it can be overridden with MySQL or managed-database parameters. Raising it should be done carefully because the practical limit depends on your workload and how much memory each connection consumes.

That makes sense—the memory-based calculation explains why the value is fixed at 16,000 on my instance.