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

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

팁앤테크

Amazon Linux 2 인스턴스 Too many connections

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 32,523회 작성일 22-10-17 23:19

본문

$ 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

댓글목록

등록된 댓글이 없습니다.

Total 779건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
779 제로 263 06-18
778 제로 2991 03-21
777 제로 3403 02-23
776 제로 29978 11-02
775 제로 33240 07-10
774 제로 42497 04-06
773 제로 30968 02-21
772 제로 35822 12-31
771 제로 30079 12-24
770 제로 29925 12-04
열람중 제로 32524 10-17
768 제로 31394 10-02
767 제로 54826 08-04
766 제로 29837 08-04
765 제로 40186 08-03
764 제로 40508 07-08
763 제로 68950 07-08
762 제로 83028 07-06
761 제로 31206 06-09
760 제로 36673 06-03
759 제로 35048 04-16
758 제로 35622 03-29
757 제로 30139 03-26
756 제로 37254 03-12
755 제로 32209 03-10

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
725
어제
25,212
최대
431,155
전체
6,725,977
Copyright (c) 株式会社YHPLUS. All rights reserved.