0

要求:

从包含 100K 记录的文件中读取。

对于每条记录,从 IBM DB2 数据库表中检索数据,然后从 NuoDB 数据库表中检索数据。

最后,在 NuoDB 数据库表中插入更新的记录。

设计方法:面向块的处理,其中 1000 条记录将从文件中读取并处理并写入数据库。

问题:大约 75K 记录并运行近 5 小时后,批处理应用程序失败并出现以下错误:

Hibernate: select ... the SELECT query for DB2
Hibernate: select ... the SELECT query for NuoDB
2020-06-08 22:00:00.187  INFO [ ,,,] 32215 --- [       Thread-9] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2a7f1f10: startup date [Mon Jun 08 17:22:51 BST 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@3972a855
2020-06-08 22:00:00.192  INFO [ ,,,] 32215 --- [       Thread-9] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2020-06-08 22:00:00.193  INFO [ ,,,] 32215 --- [       Thread-9] o.s.i.endpoint.EventDrivenConsumer       : Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2020-06-08 22:00:00.193  INFO [ ,,,] 32215 --- [       Thread-9] o.s.i.channel.PublishSubscribeChannel    : Channel ' -1.errorChannel' has 0 subscriber(s).
2020-06-08 22:00:00.193  INFO [ ,,,] 32215 --- [       Thread-9] o.s.i.endpoint.EventDrivenConsumer       : stopped _org.springframework.integration.errorLogger
2020-06-08 22:00:00.195  INFO [ ,,,] 32215 --- [       Thread-9] o.s.s.c.ThreadPoolTaskScheduler          : Shutting down ExecutorService 'taskScheduler'
2020-06-08 22:00:00.196  INFO [ ,,,] 32215 --- [       Thread-9] o.s.jmx.export.MBeanExporter             : Unregistering JMX-exposed beans on shutdown
2020-06-08 22:00:00.203  INFO [ ,,,] 32215 --- [       Thread-9] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-06-08 22:00:00.203  INFO [ ,,,] 32215 --- [       Thread-9] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-06-08 22:00:00.203  INFO [ ,,,] 32215 --- [       Thread-9] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-06-08 22:00:00.203  INFO [ ,,,] 32215 --- [       Thread-9] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-06-08 22:00:00.203  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Shutdown initiated...
2020-06-08 22:00:00.210  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Shutdown completed.
2020-06-08 22:00:00.210  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown initiated...
2020-06-08 22:00:00.211  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Shutdown completed.
2020-06-08 22:00:00.212  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2020-06-08 22:00:00.214  INFO [ ,,,] 32215 --- [       Thread-9] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

这个问题的真正原因可能是什么?这就像数据库不能在 4-6 小时内定期触发 10 万次 SELECT 查询一样吗?

我在调试模式下使用日志级别重新运行应用程序,这是我得到的错误:

com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.19.72] A communication error occurred during operations on the connection's underlying socket, socket input stream, 
or socket output stream.  Error location: Command timeout check.  Message: Command timed out. ERRORCODE=-4499, SQLSTATE=08001
4

1 回答 1

0

您的数据库连接似乎已丢失。您需要重新启动作业实例。如果配置正确,您的作业应该从失败后停止的地方重新开始。

于 2020-06-10T09:06:40.410 回答