본문 바로가기

학습/DataBase

[DB] AWS MySQL 연결 실패

개발 진행중 테스트하려고 브라우저 띄우면 반복적으로 연결 실패가 종종 발생한다.

이유를 모르겠다.

지금은 개발에 집중하고 원인 분석 및 대응은 추후에 진행하자.

 


[2023-12-27 09:03:11:453679] [http-nio-8080-exec-9] DEBUG [org.apache.ibatis.logging.jdbc.BaseJdbcLogger.debug:137] - ==> Parameters: 
[2023-12-27 09:03:11:453684] [http-nio-8080-exec-9] DEBUG [org.apache.ibatis.logging.jdbc.BaseJdbcLogger.debug:137] - <==      Total: 1
[2023-12-27 09:08:37:779932] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@1e6c2855 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:08:42:784935] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@77dd745d (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:08:47:789948] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@5156009b (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:08:52:794962] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@48a1f090 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:08:57:799980] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@3a5af8ef (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:09:02:804992] [http-nio-8080-exec-9] WARN  [cohttp://m.zaxxer.hikari.pool.PoolBase.isConnectionAlive:184] - HikariPool-2 - Failed to validate connection cohttp://m.mysql.cj.jdbc.ConnectionImpl@39f0788e (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
[2023-12-27 09:09:02:804998] [http-nio-8080-exec-9] ERROR [org.apache.juli.logging.DirectJDKLog.log:175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-2 - Connection is not available, request timed out after 30081ms.
### The error may exist in im/example/admin/mapper/TechStoryMapper.xml
### The error may involve ihttp://m.example.admin.mapper.TechStoryMapper.list
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-2 - Connection is not available, request timed out after 30081ms.] with root cause
java.net.SocketTimeoutException: Read timed out