我有一个配置的简单的基于块的 XML jbatch 作业,即使在 CentOS 6 上的 Glassfish 4.1(Build 13)中的重负载下也始终运行良好。但我最近在 CentOS 7 上创建了另一个具有相同 Glassfish 版本的安装;几乎使用默认配置。
新安装运行和完成作业有很大困难;执行速度明显变慢,无法完成并出现以下一致错误:
`[2018-05-14T06:05:28.079+0300] [glassfish 4.1] [SEVERE] [poolmgr.component_register_exception] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.rm] [tid: _ThreadID=209 _ThreadName=concurrent/batchDispatchExecutor-managedThreadFactory-Thread-5] [timeMillis: 1526267128079] [levelValue: 1000] [[
RAR5029:在 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.startJTSTx(JavaEETransactionManagerSimplified.java:439) 的 com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:305) 注册组件 javax.transaction.RollbackException 时出现意外异常在 com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.enlistLAOResource(JavaEETransactionManagerJTSDelegate.java:318) 在 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.enlistResource(JavaEETransactionManagerSimplified.java:356) 在 com.sun.enterprise.resource.rm .ResourceManagerImpl.registerResource(ResourceManagerImpl.java:152)
....
[2018-05-14T06:05:28.080+0300] [glassfish 4.1] [警告] [poolmgr.err_enlisting_res_in_getconn] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool] [tid : _ThreadID=209 _ThreadName=concurrent/batchDispatchExecutor-managedThreadFactory-Thread-5] [timeMillis: 1526267128080] [levelValue: 900] [[ RAR7132: 无法在事务中登记资源。将资源返回到池中。池名称:[ __TimerPool ]]]
[2018-05-14T06:05:28.080+0300] [glassfish 4.1] [警告] [poolmgr.get_connection_failure] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=209 _ThreadName= concurrent/batchDispatchExecutor-managedThreadFactory-Thread-5] [timeMillis: 1526267128080] [levelValue: 900] [[ RAR5117 : 无法从连接池 [ __TimerPool ] 获取/创建连接。原因:com.sun.appserv.connectors.internal.api.PoolingException: javax.transaction.RollbackException]]
[2018-05-14T06:05:28.081+0300] [glassfish 4.1] [警告] [jdbc.exc_get_conn] [javax.enterprise.resource.resourceadapter.com.sun.gjc.spi] [tid: _ThreadID=209 _ThreadName= concurrent/batchDispatchExecutor-managedThreadFactory-Thread-5] [timeMillis: 1526267128081] [levelValue: 900] [[ RAR5114:分配连接时出错:[分配连接时出错。原因:javax.transaction.RollbackException]]]
[2018-05-14T06:05:28.081+0300] [glassfish 4.1] [警告] [] [com.ibm.jbatch.container.services.impl] [tid: _ThreadID=209 _ThreadName=concurrent/batchDispatchExecutor-managedThreadFactory-Thread -5] [timeMillis: 1526267128081] [levelValue: 900] [[没有找到 executionId 的作业实例状态:306]] ....`
问题是: 1. 为什么 timerpool 不释放连接?2. Executor服务很慢?