错误 - JDBC 连接问题 - 无法获取

问题描述 投票:0回答:1

11-08-2023 06:10:03.380 [错误] [账单连接] com.billdesk.service.BillerConnectCRRMServiceImpl | TraceId = PP012308110440256981807957132230440_fetch,bbpsTxnId = null,requestType = FETCH,billerId = BESCOM000KAR01 | message=向 BOU 发送响应时出现异常 org.springframework.web.client.ResourceAccessException:“http://xxxxx:7003/****/BillerConnectFetchResponse”的 POST 请求出现 I/O 错误:读取超时;嵌套异常是 java.net.SocketTimeoutException: 读取超时 原因:java.net.SocketTimeoutException:读取超时 11-08-2023 06:10:03.394 [错误] [账单连接] org.hibernate.engine.jdbc.spi.SqlExceptionHelper |无法获取连接,池错误 等待空闲对象超时 org.springframework.transaction.CannotCreateTransactionException:无法打开 JPA EntityManager 进行事务;嵌套异常是 org.hibernate.exception.GenericJDBCException:无法获取 JDBC 连接 在 org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.1.8.RELEASE.jar:5.1.8.RELEASE] 引起原因:org.hibernate.exception.GenericJDBCException:无法获取 JDBC 连接 在 org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 在 org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 在 org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 引起原因:java.sql.SQLException:无法获取连接,池错误等待空闲对象超时 引起原因:java.util.NoSuchElementException:等待空闲对象超时 11-08-2023 06:10:03.398 [错误] [账单连接] org.hibernate.engine.jdbc.spi.SqlExceptionHelper |无法获取连接,池错误 等待空闲对象超时 11-08-2023 06:10:03.398 [错误] [账单连接] org.hibernate.engine.jdbc.spi.SqlExceptionHelper |无法获取连接,池错误 等待空闲对象超时 11-08-2023 06:10:03.398 [错误] [账单连接] org.hibernate.engine.jdbc.spi.SqlExceptionHelper |无法获取连接,池错误 等待空闲对象超时 11-08-2023 06:10:03.398 [错误] [账单连接] org.hibernate.engine.jdbc.spi.SqlExceptionHelper |无法获取连接,池错误 等待空闲对象超时 11-08-2023 06:10:03.398 [错误] [账单连接] org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler |调用异步方法时发生意外异常:public void com.billdesk.service.BillerConnectCRRMServiceImpl.saveWorkflowStatus(java.lang.Long,java.lang.String,java.lang.String,com.billdesk.common.models.LogTrace) org.springframework.transaction.CannotCreateTransactionException:无法打开 JPA EntityManager 进行事务;嵌套异常是 org.hibernate.exception.GenericJDBCException:无法获取 JDBC 连接 引起原因:org.hibernate.exception.GenericJDBCException:无法获取 JDBC 连接 在 org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 在 org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 在 org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final] 引起原因:java.sql.SQLException:无法获取连接,池错误等待空闲对象超时 引起原因:java.util.NoSuchElementException:等待空闲对象超时

我们杀死长时间运行/不活动的会话。 它已经工作了一段时间,但面临同样的问题,无法获取 jdbc 连接..

oracle jdbc connection weblogic aix
1个回答
0
投票

关键部分是:“无法获取连接,池错误超时等待空闲对象”

简单来说,您有一个大小为“n”的连接池,并且(从连接池的角度来看)所有“n”当前都分配给某种任务,而您是“n+1”个人。

因此,您必须等到池中的会话可供您使用,而您等了太久,我们放弃了。

快速的“解决方案”是更大的池子,但一般来说,这种方法只是推迟了不可避免的事情。您确实需要解决根本原因,即为什么会话没有被释放回池中

© www.soinside.com 2019 - 2024. All rights reserved.