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 ?

I am less concerned by the webapp-to-external servers connections in
CLOSE_WAIT state, these connections are handled using httpAsyncClient with
a pool system that has a defined size and an eviction strategy (if too many
connections are opened new connections request will only wait for say 100
ms before failling).

We will look into the configuration you advice to check on nginx and tomcat
size to see how it's setup.

Thanks
Thomas

2015-04-22 11:38 GMT+02:00 André Warnier <a...@ice-sa.com>:

> Rainer Jung wrote:
>
>> Am 22.04.2015 um 00:08 schrieb André Warnier:
>> ...
>>
>>> The OP has a complex setup, where we are not even sure that the various
>>> connections in various states are even related directly to Tomcat or not.
>>> Graphically, we have this :
>>>
>>> client <-- TCP --> nginx <-- TCP --> Tomcat <--> webapp <-- TCP -->
>>> external servers
>>>
>>> The output of netstat shows all the connections and their state, at the
>>> OS level.  Even assuming that nginx runs on a separate host, that still
>>> leaves the possibility that most of the connections in CLOSE_WAIT state
>>> for example, would be connections between the webapps and external
>>> servers, having not much to do with Tomcat per se.
>>> But of course they use fd's and resources, just like the others. And for
>>> "lsof", they would appear as "belonging" to the Tomcat process.
>>>
>>
>> See my response from 1.5 days ago which contains the individual
>> statistics for each of the above three "TCP" parts.
>>
>>
> Yes, sorry Rainer, I did not read that as carefully as I should have.
>
> And I do agree that the two main things which the OP should have a good
> look at, are
> - the nginx settings for "keep-alive" (client-nginx side)
> - the various webapp-to-external servers connections in CLOSE_WAIT state
> Collectively, these things must be using a lot of resources on the server,
> and probably slow it down significantly.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to