Amazon Linux 2 인스턴스 Too many connections > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

Amazon Linux 2 인스턴스 Too many connections

페이지 정보

본문

$ mysql -u root -p

 

상태확인
$ show variables like "%max_connections%";

max_connections: 최대 접속수
기본값은 151 -> 변경 값 2000


wait_timeout 변경
$ show variables like "%wait_timeout%";

wait_timeout은 mysqld와 client가 연결을 맺은 후, 다음 쿼리까지 기다리는 최대 시간입니다.
wait_timeout안에 요청이 들어오면 다시 0으로 초기화됩니다.
too many connections 에러가 뜨지 않기 위해선 바꿔줘야합니다.
기본값 28800(8시간) ->  변경 값 3600


interactive_timeout 변경
$ show variables like "%interactive_timeout%";

interactive_timeout은 터미널 모드 (ex: mysql>)에서의 다음 쿼리까지 기다리는 최대 시간입니다.
기본값 28800(8시간) ->  변경 값 3600

 

 

/opt/bitnami/mariadb/conf/my.cnf

[mysqld]

추가

max_connections=2000
interactive_timeout=3600
wait_timeout=3600

 

상태 확인

$ sudo /opt/bitnami/ctlscript.sh status

 

전체 재부팅

$ sudo /opt/bitnami/ctlscript.sh restart

 

개별 재부팅

$ sudo /opt/bitnami/ctlscript.sh restart apache
$ sudo /opt/bitnami/ctlscript.sh restart mariadb

추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 41 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
게시물이 없습니다.

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
5,532
어제
5,850
최대
7,259
전체
1,216,484
Copyright (c) 株式会社YHPLUS. All rights reserved.