是什么引发了 HTTP 503 以及如何更改超时?

发布于 2024-07-15 22:47:01 字数 495 浏览 5 评论 0 原文

我继承了一个应用程序(我公司内部的),该应用程序使用在 Internet Explorer 中运行的 javascript,该应用程序对在 WebLogic Server v10 中运行的基于 Struts 的应用程序进行 Ajax 调用。

系统中某些服务器端操作花费的时间超过 3 分钟。 用户一致注意到 Ajax 调用在 3 分钟处返回 503 错误。 我的用户可以等待超过 3 分钟,但 503 错误中断了他们的工作。

该应用程序需要进行性能调整,但我们迫切需要一个临时解决方法来延长返回 503 错误之前可以发生的时间。

当前的理论是 503 错误是由 IE XMLHttpRequest 对象引发的。 一个由所谓的 WebLogic 专家组成的团队仔细研究了我们的代码和 WebLogic 日志,并声明服务器端没有发生超时。 但我有疑问。

我的问题是,哪个软件负责引发 503 错误:浏览器、Ajax javascript 还是服务器? 并且这个超时时间可以改变吗?

I have inherited an application (internal to my company) that uses javascript running in Internet Explorer which makes Ajax calls to a Struts-based application running in WebLogic Server v10.

Certain server-side operations in the system are taking longer than 3 minutes. Users consistently noticed that the Ajax call returns 503 error at the 3 minute mark. My users can wait longer than 3 minutes, but 503 errors interrupt their work.

This application needs to be performance tuned, but we badly need a temporary workaround to extend how much time can occur before a 503 error is returned.

The current theory is that the 503 error is being raised by the IE XMLHttpRequest object. A team of supposed WebLogic experts poured over our code and WebLogic logs, and declared that there's no timeout occurring on the server side. But I have my doubts.

My question is, which piece of software is responsible for raising 503 error: the browser, the Ajax javascript, or the server? And can this timeout period be changed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

你丑哭了我 2024-07-22 22:47:01

503 错误是许多不同类型错误的统称,通常发生在服务器端。 在您的情况下,服务器可能会在一定的超时后拒绝连接,并以 503 响应,表明服务器过载或无法处理您的请求。

很多时候,对于 Web 服务,当服务器代码抛出异常或错误时,将返回 503。 如果服务器代码不能正确处理错误,它将向上冒泡到服务器,服务器只会以通用 503 进行响应。

http://www.checkupdown.com/status/E503.html

错误代码 5xx(备用定义)

RFC 2616

A 503 error is kind of a catch-all for a lot of different types of errors, usually on the server side. In your case it could be that the server is just rejecting the connection after a certain timeout, and responding back with a 503 to indicate that the server is overloaded or cannot process your request.

A lot of times with web services, a 503 will be returned when the server code throws an exception or error. If the server code doesn't properly handle the error, it will bubble up to the server, which will just respond back with a generic 503.

http://www.checkupdown.com/status/E503.html

Error code 5xx (alternate definition)

RFC 2616

烟燃烟灭 2024-07-22 22:47:01

503是服务器错误。 XMLHttpRequest 很乐意等待超过 3 分钟。 您应该做的第一件事就是通过 telnet 或 netcat 或类似的方式访问有问题的 URL,并在图片中看到带有 javascript 的 503,从而满足自己的要求。

然后就可以继续在服务器端查找超时了。

503 is a server error. XMLHttpRequest will happily wait longer than 3 minutes. The first thing you should do is satisfy yourself of that by visiting the problem URL in telnet or netcat or similar and seeing the 503 with javascript out of the picture.

Then you can proceed to find the timeout on the server side.

满意归宿 2024-07-22 22:47:01

您的 Web 服务器存在请求回复超时,长时间运行的服务请求会导致该超时。 它可以是 WebLogic 服务器或代理。 肯定不是客户。

您是否考虑过提交一个将立即响应的异步 HTTP 请求,然后轮询另一个位置以获取最终结果? 三分钟大约太长了 170 秒。

Your web server has a request reply timeout which is being tripped by long-running service requests. It could be the WebLogic server or a proxy. It is certainly not the client.

Have you considered submitting an asynchronous HTTP request that will be responded to immediately, and then polling another location for the eventual results? Three minutes is about 170 seconds too long.

痴意少年 2024-07-22 22:47:01

503 很可能是由于服务器超时造成的。 如果您可以调整 Apache 服务器,请阅读有关可以在 httpd.conf 中设置的超时属性的信息。
查看 httpd/logs/error_log 以查看是否发生超时。
另请参阅此答案:Apache 错误日志中的 Mod 集群代理超时

503 is most likely due to a timeout on the server. If you can tune your Apache server, read about the Timeout attribute that you can set in httpd.conf.
Look in the httpd/logs/error_log to see if timeouts are occurring.
Refer also to this answer: Mod cluster proxy timeout in apache error logs .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文