GunSik2 / engineering_qna

Software Engineering Problem and Solving
0 stars 0 forks source link

mysql tunning #3

Open GunSik2 opened 5 years ago

GunSik2 commented 5 years ago

Problem

mariadb 기본 설치 후 운영 시 connection 100개로 초과시 오류 발생

Task 105 | 07:47:38 | Error: Mysql2::Error: Too many connections

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 | +-----------------+-------+


## Reference
- https://zetawiki.com/wiki/MySQL_max_connections_%EC%84%A4%EC%A0%95