티스토리 뷰
[ 오늘의 장애 정리 ]
어제 새벽부터 갑자기 서버가 죽음 ㅜ
두대 돌리고 있었는데 두대 다 죽어버림..
로그는 아래와 같다 (주요 로그들만)
2019:01:17 01:02:35.401 WARN --- [http-nio-8080-exec-1] o.h.e.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: null 2019:01:17 01:02:36.032 ERROR --- [http-nio-8080-exec-1] o.h.e.jdbc.spi.SqlExceptionHelper : HikariPool-1 - Connection is not available, request timed out after 30000ms. 2019:01:17 01:02:39.641 INFO --- [http-nio-8080-exec-91] c.s.s.s.impl.ResultServiceImpl : org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection 2019:01:17 01:02:44.224 WARN --- [http-nio-8080-exec-19] o.h.e.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: null 2019:01:17 01:02:46.098 ERROR --- [http-nio-8080-exec-19] o.h.e.jdbc.spi.SqlExceptionHelper : HikariPool-1 - Connection is not available, request timed out after 38882ms. 2019:01:17 01:04:49.721 INFO --- [http-nio-8080-exec-192] c.s.s.s.impl.ResultServiceImpl : org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection 2019:01:17 01:12:02.982 INFO --- [http-nio-8080-exec-1] c.s.s.s.impl.ResultServiceImpl : org.springframework.dao.DataAccessResourceFailureException: unable to obtain isolated JDBC connection; nested exception is org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection 2019:01:17 01:12:03.304 ERROR --- [http-nio-8080-exec-6] o.h.e.jdbc.spi.SqlExceptionHelper : HikariPool-1 - Connection is not available, request timed out after 30125ms. 2019:01:17 01:12:03.312 INFO --- [http-nio-8080-exec-4] c.s.s.s.impl.ResultServiceImpl : org.springframework.dao.DataAccessResourceFailureException: unable to obtain isolated JDBC connection; nested exception is org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection 2019:01:17 01:12:03.589 ERROR --- [http-nio-8080-exec-91] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space] with root cause java.lang.OutOfMemoryError: Java heap space |
// 로그에서 Hikari 검색
2019:01:17 13:00:08.962 WARN --- [http-nio-8080-exec-6] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to validate connection com.mysql.jdbc.JDBC4Connection@32e56bc7 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value. |
저런게 엄청 나옴...
아니 근데 찾아도 찾아도 Hikari라는 건 안쓴단 말이지
찾아보니
Spring Boot 2.x 이상 부터 Hikari가 강제적으로 기본 제공된다고 함 -ㅂ-
요 Hikari 기본 셋팅이 사용하는 DBMS 셋팅 시간 보다 길어 쓰레드 풀이 일어남
왜 그런지는 아래 블로그 참고
참고 : https://d2.naver.com/helloworld/5102792
먼저 DB설정 값들을 확인 해보자
show variables like '%time%'
현재 DB에 설정 된 값이..
wait_timeout 600
net_read_timeout 30
spring.datasource.hikari.idle-timeout=10000
spring.datasource.hikari.max-lifetime=420000
spring.datasource.hikari.connection-timeout=10000
spring.datasource.hikari.validation-timeout=10000
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
'Framework > SpringBoot' 카테고리의 다른 글
[Spring Boot] Ajp 에러- Invalid message received with signature (1) | 2019.04.09 |
---|---|
[Spring Boot] Spring Boot 2.x Tomcat https-http 동시 사용 (Tomcat Ajp설정) (0) | 2019.04.09 |
[SpringBoot] Spring REST API에 Swagger(스웨거)설정하기 (0) | 2017.07.26 |
[SpringBoot] Http를 Https로 전환/ 리다이렉트 시키기 (Redirecting HTTP to HTTPS in Spring Boot) (1) | 2017.07.24 |
[SpringBoot] Spring과 Spring Boot의 차이 (0) | 2017.07.12 |
- Total
- Today
- Yesterday
- entityfactory
- JPA 엔티티
- JPA란
- springboot
- plugin
- HTTP
- spring boot 포트
- 플러그인
- 자바 가상머신
- https 동시사용
- JPA 영속성관리
- 의존성 사이클
- JPA
- AJP
- nginx
- entity type
- SSL
- tomcat Ajp
- spring jpa
- spring boot 2.1
- entitymanager
- spring boot http
- 엔진엑스
- Spring
- 프록시 설정
- angular2
- jpa 값타입
- HTTPS
- spring boot
- exception종류
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |