Back

mysql - too many connections

发布时间: 2023-03-11 10:35:00

refer to:
https://www.thegeekdiary.com/mysql-error-too-many-connections-and-how-to-resolve-it/

This error is caused by mysql, but not rails config.

check variable: max_connections:

SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+

increase it : SET GLOBAL max_connections = 1024;

Back