gpt4 book ai didi

java - Spring Batch应用程序sqlcode -4499 sqlstate 08001

转载 作者:行者123 更新时间:2023-12-01 16:21:11 32 4
gpt4 key购买 nike

要求:

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

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

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

设计方法:面向 block 的处理,将从文件中读取 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.

此问题的实际原因是什么?这就像数据库无法定期触发 100K 次 SELECT 查询 4-6 小时一样吗?

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

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

最佳答案

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

关于java - Spring Batch应用程序sqlcode -4499 sqlstate 08001,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62272396/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com