Open GunSik2 opened 5 years ago
mariadb 기본 설치 후 운영 시 connection 100개로 초과시 오류 발생
Task 105 | 07:47:38 | Error: Mysql2::Error: Too many connections
[mysqld] bind-address=0.0.0.0
connect_timeout = 60 wait_timeout = 28800 interactive_timeout = 28800 max_connections = 1000 max_allowed_packet = 256M max_connect_errors = 1000
- 반영
sudo service mysqld restart
- 적용 확인
MariaDB [(none)]> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 1000 | +-----------------+-------+
## Reference - https://zetawiki.com/wiki/MySQL_max_connections_%EC%84%A4%EC%A0%95
Problem
mariadb 기본 설치 후 운영 시 connection 100개로 초과시 오류 발생
Solution
설정 변경
connect_timeout = 60 wait_timeout = 28800 interactive_timeout = 28800 max_connections = 1000 max_allowed_packet = 256M max_connect_errors = 1000
sudo service mysqld restart
MariaDB [(none)]> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 1000 | +-----------------+-------+