Failed HTTP Requests on Tomcat

My web application runs on the 64-bit version of Java 6.0.23, Tomcat 6.0.29 (with Apache Portable Runtime 1.4.2), on Linux (CentOS). Tomcat JAVA_OPTS includes -Xincgc, which is supposed to help prevent long garbage collections.

The application is under heavy load and has intermittent crashes, and I would like to fix it.

Here's a symptom: very quickly, the HTTP client sends an HTTP request to the web application and receives an empty response.

The application does not use a database, so this is definitely not a problem with JDBC connections. Therefore, I believe that the problem is probably one of: memory (possibly long garbage collections), from streams, or from file descriptors.

I used javamelody to view the number of threads that are being used, and it seems that maxThreads is set high enough not to work from threads. Similarly, we have the number of file descriptors available that are set to a very large number.

The application has a lot of memory. Does memory seem to be the culprit here, or is there something else that I could ignore?

I assume that my main confusion, however, is why garbage collection will cause HTTP requests to fail. Intuitively, I suppose that a long garbage collection may cause the HTTP request to take a long time, but I would not have guessed that a long garbage collection would cause the HTTP request to fail.


More info in response to John Skeet's comments ...

, , . . , HTTP.

+3
1

, .

, " ":

  • ?
  • ?
  • HTTP, ?

, . , . , .

0

Source: https://habr.com/ru/post/1780483/


All Articles