Am 22.04.2015 um 11:58 schrieb Thomas Boniface:
What concerns me the most is the CLOSE_WAIT on tomcat side because when an
fd peak appears the web application appears to be stuck. It feels like all
its connections are consumed and none can be established from nginx
anymore. Shouldn't the CLOSE_WAIT connection be recycled to received new
connections from nginx ?

Just to clarify:

Every connection has two ends. In netstat the "local" end is left, the "remote" end is right. If a connection is between processes both on the same system, it will be shown in netstat twice. Once for each endpoint being the "local" side.

CLOSE_WAIT for a connection between a (local) and b (remote) means, that b has closed the connection but not a. There is no automatism for a closing it because b has closed it. If CLOSE_WAIT pile up, then the idea of b and a when a connection should no longer be used are disparate. E.g. they might have very different idle timeouts (Keep Alive Timeout on HTTP speak), or one observed a problem that the other didn't observe.

When I did the counting for

  Count           IP:Port ConnectionState
   8381    127.0.0.1:8080 CLOSE_WAIT

the "127.0.0.1:8080" was left in netstat output, so "local". It means the other side (whatever is the other side of the connection, likely nginx) has closed the connection alardy, but not Tomcat.

And the total number of those connections:

  Count           IP:Port ConnectionState
   8381    127.0.0.1:8080 CLOSE_WAIT
   1650    127.0.0.1:8080 ESTABLISHED

indeed sums up to the default maxConnections 10000 mentioned by Chris.

What I do not understand is, that the same connections looked at from nginx being the local end, show a totally different statistics:

  Count           IP:Port ConnectionState
  20119    127.0.0.1:8080 SYN_SENT
   4692    127.0.0.1:8080 ESTABLISHED
    488    127.0.0.1:8080 FIN_WAIT2
    122    127.0.0.1:8080 TIME_WAIT
     13    127.0.0.1:8080 FIN_WAIT1

But maybe that's a problem to solve after you fixed the CLOSED_WAIT (or the 1000 limit) and redo the whole observation.

Pretty big numbers you habe ...

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to