Tomcat responding HTTP 503

2019-06-22 07:46发布

I hosted my application, and doing some stress tests, I noticed that when shooting around 50 requests in parallel, the server responds HTTP 503.

What does this means? It may be some specific configuration limiting the number of requests from Tomcat?

Thanks.

3条回答
smile是对你的礼貌
2楼-- · 2019-06-22 08:18

A 503 status indicates the service handling the request is unavailable.

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

- HTTP Specification on 503

From time-to-time you'll see this if you're running Tomcat behind Apache, with Apache operating as a proxy. If Apache is unable to contact Tomcat it will return a 503 response.

查看更多
▲ chillily
3楼-- · 2019-06-22 08:37

If you are using Apache httpd as a front-end, you may want to check if there is a firewall between Tomcat and Apache. After having disabled the firewall on the Tomcat machine in our environment, the 503 errors disappeared.

See also this.

Above document also describes other less drastic ways of solving the 503 problem when a firewall is involved.

查看更多
对你真心纯属浪费
4楼-- · 2019-06-22 08:43

That typically just means you've run out of threads to handle the request. You could try increasing the maxThreads in your Tomcat server.xml file, or if you're using Apache HTTP server as a front end, you may need to configure your Connector to allow more connections.

查看更多
登录 后发表回答