關於連接connection reset的問題
阿新 • • 發佈:2018-03-09
cau resource session cep 數量 port 題解 nsa enc
weblogic做服務器,今天進行了並發的測試性能,100的並大量,但是出現如下錯誤。
(並發中調用了數據庫,沒調用一次建立一個連接,由於是並發環境,導致連接池資源耗盡)
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:545) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:315) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:234) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy95.getAgentGgDocumentDto(Unknown Source) at com.sinosoft.application.print.rpcservice.impl.PrintRpcServiceImpl.getBatchEReport(PrintRpcServiceImpl.java:161) ... 16 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354) at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:517) ... 23 more Caused by: weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool sinosoftDataSource to allocate to applications, please increase the size of the pool and retry.. at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:252) at weblogic.jdbc.pool.Driver.connect(Driver.java:161) at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:651) at weblogic.jdbc.jts.Driver.connect(Driver.java:127) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 28 more
這個問題是數據連接池不夠用了,將其設置為更大的數值(比如:100),這個問題解決。
2.第二個問題,當我數據連接池夠用的情況下,出現connection reset.
第一種可能:請求的資源(項目)性能達到了最大,導致不能處理過多的請求,連接被強制結束(客戶端達到了關閉請求的條件)(服務端項目性能問題)
第二種可能:weblogic設置了做大的連接數量(連接線程池),導致過的的請求直接被拒絕,連接重置 (weblogic配置問題)
關於連接connection reset的問題