spring-batch - WebSphere8 中 30 分钟后出现 500 内部服务器错误
问题描述
我开发了一个 Spring Batch 应用程序,并托管在一个公司 WebSphere 8.5.15 服务器中。这个应用程序的一些休息端点用于执行不同的作业,这些作业基本上是调用存储过程并执行多个数据库查询。
我使用 curl 调用端点,如下所示:
curl --insecure --request GET 'https://mycorp.server.com:1443/batch/api/job/job1?odate=050820'
执行 30 分钟后,我收到以下回复:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
ped@mycorp.server.com to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
<p>Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body>
</html>
在处理请求 30 分钟后,我多次尝试执行并且总是收到相同的错误“500 Internal Server Error”。在日志文件中似乎一切正常,没有报告错误或异常。
解决方案
服务器偶尔无法正确响应是很常见的情况(500 错误)。您应该通过告诉您的程序在出现错误时休眠几秒钟来解决此问题,然后根据需要继续对服务器的任何调用。从本质上讲,只要承认你会遇到这样的问题并尽你所能解决它们。
推荐阅读
- maven - 在 Maven 着色插件中附加属性
- reactjs - 如何在整个 React 应用程序中跟踪应用程序自定义事件
- algorithm - 邻接表表示中图的贪心着色算法
- docker - 运行 Swagger docker 容器作为服务器的扩展
- logstash - 如何从logstash中的选择列创建嵌套对象
- python - 直接计算第 n 个斐波那契项,而无需使用比内公式找到先前的项。(在 O(1) 时间内)
- pytorch - pytorch 版本中的 .post2 是什么意思?
- mysql - MySQL分区中涉及的列重命名失败
- c++ - 寻找解决这个动态规划问题的提示
- python - Python:AttributeError:'str'对象在for循环中调用方法时没有属性