Каждый раз, когда я изначально делаю вызов API, я сталкиваюсь с задержкой в 25 секунд для получения пула соединений. Когда я храню свое приложение локально, у меня не возникает никаких задержек.
Код: Выделить всё
2024-08-06 09:40:19.716 DEBUG 1 --- [nio-9013-exec-6] o.apache.coyote.http11.Http11Processor : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@2d53393c:org.apache.tomcat.util.net.NioChannel@36787f9c:java.nio.channels.SocketChannel[connected local=orderservice-deployment-784cc9d757-ncrvp/10.xx.xx.xx:xxxx remote=/10.xx.xx.xx:xxxx]], Status in: [OPEN_READ], State out: [CLOSED]
2024-08-06 09:40:19.716 DEBUG 1 --- [nio-9013-exec-6] o.apache.tomcat.util.threads.LimitLatch : Counting down[http-nio-9013-exec-6] latch=2
2024-08-06 09:40:19.716 DEBUG 1 --- [nio-9013-exec-6] org.apache.tomcat.util.net.NioEndpoint : Calling [org.apache.tomcat.util.net.NioEndpoint@2763c145].closeSocket([org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@2d53393c:org.apache.tomcat.util.net.NioChannel@36787f9c:java.nio.channels.SocketChannel[connected local=orderservice-deployment-784cc9d757-ncrvp/10.xx.xx.xx:xxxx remote=/10.xx.xx.xx:xxxx]])
2024-08-06 09:40:20.654 DEBUG 1 --- [13-ClientPoller] org.apache.tomcat.util.net.NioEndpoint : timeout completed: keys processed=1; now=1722937220654; nextExpiration=1722937219753; keyCount=0; hasEvents=false; eval=false
2024-08-06 09:40:21.520 DEBUG 1 --- [nio-9013-exec-3] c.t.d.s.OracleDbConnector : time taken to get the connection pool :: 25012
2024-08-06 09:40:21.520 DEBUG 1 --- [nio-9013-exec-3] c.t.d.s.OracleDbConnector : sql query for execution :: select u.um_user_id,e.em_controller_id,e.xxxxx from user_master where u.um_em_entity_id=e.em_entity_id and e.em_entity_id='xxxx'
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] c.t.d.s.OracleDbConnector : time taken to execute query :: 6
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 DEBUG 1 --- [nio-9013-exec-3] DbConnectorLogging : INTERACTIVE::
2024-08-06 09:40:21.526 INFO 1 --- [nio-9013-exec-3] c.t.s.o.service.OrderProcessServiceImpl : entity details ::{controllerId=, userIdOrLogPktId=, custodianId=} lzi8bkzr-55vkrk5i2xk_6051288
Код: Выделить всё
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.connection-timeout=800000
spring.datasource.hikari.idle-timeout=800000
spring.datasource.hikari.max-lifetime=1200000
spring.datasource.hikari.maximum-pool-size=30
spring.datasource.hikari.minimum-idle=15
п>
Подробнее здесь: https://stackoverflow.com/questions/790 ... ction-pool
Мобильная версия