› Spec
CPU: Apple M1 or Intel i5
RAM: 8GB
Storage: 256GB SSD
OS: macOS or Windows 11
Python: 3.11.5 and 3.8.7
Python_venv_path: Only /desktop/[folder]
IDE: Visual Studio Code
› Home › About › Archive › Categories › Guestbook

Categories : SQL

MySQL 'Too many connections' Error


  1. MySQL Error 경험
    1. 0. MySQL 에러해결

MySQL Error 경험

MySQL애 클라이언트의 수가 일정수치 이상인 경우 나타는 에러메시지이다.

0. MySQL 에러해결

  1. 현재 연결된 커넥션 확인
    SHOW STATUS LIKE 'Threads_connected';
    


    too-many-connections-error-1

  2. 현재 설정된 max_connections 확인
    SHOW VARIABLES LIKE 'max_connections';
    


    too-many-connections-error-2
    ‘max_connections’가 숫자가 작으면 3번째 순서로 적용

  3. max_connections 한계치 수정
    SET global max_connections = 130;
    


    확인되었던 ‘connected’ 보단 높고 넉넉하게 설정

  4. 데이터 교환이 없을 경우 연결 끊기
    SET global wait_timeout = 180;
    


    3분간 교환이 없을경우 끊기 (‘초’단위임)
    데이터 교환없이 시간이 지난 경우 바로 끊기기 때문에 사용자가 다시 로그인해야함


확대 이미지