如何修复J2CA0045E:在为资源jdbc /“my_datasource”调用createOrWaitForConnection方法时连接不可用

时间:2018-05-23 10:47:53

标签: websphere datasource connection-pooling websphere-8

我在IBM AIX 7.2服务器上的Websphere ND 8.5.5.9中安装了一个J2EE应用程序。 在安装应用程序时,我通过给出虚拟值来跳过队列设置。然后,当队列试图连接到虚拟设置时,出现了侦听器端口问题。这样连接池已满,系统启动时提供异常。因此,我重新安装了应用程序并将Listener端口保持在STOP模式。前几个小时应用程序按预期运行。现在,它给出了以下例外情况:

    [5/23/18 17:29:53:609 CEST] 000000a9 FreePool      E   J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/"". 
[5/23/18 17:31:12:899 CEST] 00000055 FreePool      E   J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/"". 
[5/23/18 17:31:12:900 CEST] 00000055 AlarmThreadMo W   UTLS0009W: Alarm Thread "Non-deferrable Alarm : 0" (00000055) previously reported to be delayed has now completed.  It was active for approximately 180004 milliseconds. 
[5/23/18 17:32:11:191 CEST] 00000029 AlarmThreadMo W   UTLS0008W: The return of alarm thread "Non-deferrable Alarm : 2" (00000057) to the alarm thread pool has been delayed for 18271 milliseconds. This may be preventing normal alarm function within the application server. The alarm listener stack trace is as follows:
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:201)
            at com.ibm.ejs.j2c.FreePool.queueRequest(FreePool.java:438)
            at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1344)
            at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3898)
            at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3118)
            at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1548)
            at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1031)
            at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:646)
            at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:924)
            at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl$DSWrapper.getConnection(DatabaseHelperImpl.java:1595)
            at com.ibm.ws.extensionhelper.db.impl.DatabaseHelperImpl.getConnection(DatabaseHelperImpl.java:750)
            at com.ibm.ws.leasemanager.impl.LeaseManagerDBHelper.getConnection(LeaseManagerDBHelper.java:213)
            at com.ibm.ws.leasemanager.impl.LeaseStoreImpl.renew(LeaseStoreImpl.java:452)
            at com.ibm.ws.leasemanager.impl.LeaseImpl.renew(LeaseImpl.java:141)
            at com.ibm.ws.scheduler.LeaseAlarm.alarm(LeaseAlarm.java:173)
            at com.ibm.ejs.util.am._Alarm.runImpl(_Alarm.java:151)
            at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:136)
            at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892).

请建议在不进行任何代码更改的情况下可以执行哪些操作来释放连接池。是否可以在OS级别或Websphere级别处理它?<​​/ p>

1 个答案:

答案 0 :(得分:0)

18秒等待的最后一个警告是由WAS调度程序进行的连接尝试。您应该查看您的配置,以查看调度程序是否配置为使用相同的数据源,jdbc /“”(这是一个不寻常的名称 - 这个数据源是否正确配置?)作为先前的错误。这些错误/警告背后的原因有几种可能性。您可能有一个大小不足的连接池来处理应用程序所需的负载,或者您可能拥有连接时间太长的代码,这会使数据源的其他用户匮乏。