티스토리 뷰
상황
200개의 리퀘스트를 던지는 부하테스트 중에 max DB connection pool을 200으로 설정하면 아래와 같은 에러가 발생함.
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
### The error may exist in jp/co/toppan/aiocr/bpo/app/domain/repository/EntryRepository.java (best guess)
### The error may involve jp.co.toppan.aiocr.bpo.app.domain.repository.EntryRepository.selectEntryByStatus-Inline
### The error occurred while setting parameters
### SQL: SELECT -생략-
### Cause: org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
; ERROR: could not open file "base/16384/16729": Input/output error; nested exception is org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
org.springframework.dao.DataAccessResourceFailureException:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
### The error may exist in Repository.java (best guess)
### The error may involve Repository.selectEntryByStatus-Inline
### The error occurred while setting parameters
### SQL: SELECT -생략-
### Cause: org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
; ERROR: could not open file "base/16384/16729": Input/output error; nested exception is org.postgresql.util.PSQLException: ERROR: could not open file "base/16384/16729": Input/output error
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:107)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
해결
- 당연한 얘기지만 max DB connection pool을 좀 더 작게 설정하면 해결됨.
- 200으로 바꾼 이유는 100으로 했을 때 DB connection을 가져올 때 10초이상 대기하는 문제가 있어서였는데 150으로 조정했더니 길어도 426ms에는 가져올 수 있었음.
- 200유저가 로그인한 상태라 connection pool만 문제였는지도 의문이기도하고 테스트 환경이 로컬머신이라 늦었던 것도 있을 것 같음
'today'work' 카테고리의 다른 글
파일(PDF, 이미지)에서 QR코드 인식하기 (1) | 2023.10.29 |
---|---|
컴파일 시 Lombok Builder 클래스를 못 찾는 에러 (0) | 2023.09.28 |
PostgreSQL ROW LOCK걸기(FOR UPDATE, SKIP LOCKED) (0) | 2023.07.20 |
로그파일 index 자리수 변환하기 (0) | 2023.07.19 |
spring boot app과 redis cluster를 docker로 사용할 때 Redis connection failed 발생 (0) | 2023.07.19 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 로그파일인덱스
- lombok #maven build #sym
- multipleIntegrationFlow
- add two numbers
- json
- 로그테스트 #콘솔로그테스트 #System.out
- leetcode
- palindrome number
- spring-integration
- spring #redis #redis-cluster
- reverse integer
- Postgresql #MultiTruncate
- springintegration #파일감시 #디렉토리감시 #파일완료검사
- cannotResolveSymbol
- logback #logstash #LoggingEventCompositeJsonEncoder #로그JSON
- yaml
- Maven LF #메이븐 개행문자
- excel to markdown
- PostgreSQL #FOR UPDATE #SKIP LOCKED
- excel table
- Two Sum
- Python #Powertools
- SnakeYAML
- AWS #X-Ray
- PostgreSQL #sequnceName
- QR코드읽기 #ReadQRCode
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함