14

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?

  • Following up on this old question... in my case, this was caused by poorly tuned server code taking too long to respond. Getting the response to under 30 seconds (at least) has made this symptom go away. Still not sure which software was raising the 503 and/or how to change the timeout, so I guess I'll leave this question open. – Christopher Graziano Dec 14 '09 at 23:07
  • The wording on this question was perfect! Very belated thanks for a great question. These are the kind of questions SO needs – thedouglenz Feb 17 '15 at 14:46

4 Answers4

4

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

Charles
  • 90
  • 1
  • 6
Andy White
  • 86,444
  • 48
  • 176
  • 211
3

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.

dwc
  • 24,196
  • 7
  • 44
  • 55
2

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 .

Community
  • 1
  • 1
hrabinowitz
  • 1,600
  • 2
  • 13
  • 12
2

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.

Steven Huwig
  • 20,015
  • 9
  • 55
  • 79