The system variable max_connections determines the number of connections which MySQL/MariaDB will accept. The default value is 151 connections, which allows 150 normal connections plus one connection from the SUPER account. SUPER is a MySQL privilege that grants admin rights to the user.
The first thing to decide is what new maximum value you want to set for max_connections. There are several considerations to take into account when increasing the number of MySQL/MariaDB connections. The maximum number which can be supported by the system will depend on:
- The amount of available RAM
- How much RAM each connection takes (simple queries will require less RAM than more labor-intensive connections).
- The acceptable response time.
According to the MySQL documentation, most Linux systems should be able to support 500 to 1,000 connections without difficulty.