You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephen Stevie <ar...@gmail.com> on 2024/06/26 05:18:24 UTC

Many CLOSE_WAIT connections causing the app not available

We are using Apache Tomcat 8.5.49 and sometimes in a day, we see the
application is going unresponsive though the service is up and running and
giving 503 (service unavailable error). When netstat for the port is run,
we see many CLOSE_WAIT connections. Once we restart the service, the
application is coming back and sometimes this comes back on its own.

We have not made any changes to Tomcat in recent times and it was working
fine until the start of this year. After that, it was once a month and now
every alternate day, we are seeing this. We're using 16GB RAM Web Server (2
servers) and can see 1k-1.5k users connected to the application in a day.

Requesting your support here.



-- 
Stephen

Re: Many CLOSE_WAIT connections causing the app not available

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Stephen,

On 6/29/24 07:57, Stephen Stevie wrote:
> Tomcat not configured on default port
> <Connector port="9210" protocol="HTTP/1.1"
>                 connectionTimeout="20000"
>                 redirectPort="8443" maxHttpHeaderSize="65536"
> maxPostSize="-1" maxSavePostSize="-1"/>
> 
>   <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
> tomcatAuthentication="false" emptySessionPath="true" enableLookups="false"
> URIEncoding="UTF-8" packetSize="65536" />

Which port is most often showing in the CLOSE_WAIT state?

> [...] it was working fine until the start of this year. After that,
> it was once a month and now every alternate day, we are seeing this.
Has the usage pattern of your application changed at all? More users, etc.?

-chris

> On Thu, Jun 27, 2024 at 9:58 PM Christopher Schultz <
> chris@christopherschultz.net> wrote:
> 
>> Stephen,
>>
>> On 6/26/24 01:18, Stephen Stevie wrote:
>>> We are using Apache Tomcat 8.5.49 and sometimes in a day, we see the
>>> application is going unresponsive though the service is up and running
>> and
>>> giving 503 (service unavailable error). When netstat for the port is run,
>>> we see many CLOSE_WAIT connections. Once we restart the service, the
>>> application is coming back and sometimes this comes back on its own.
>>>
>>> We have not made any changes to Tomcat in recent times and it was working
>>> fine until the start of this year. After that, it was once a month and
>> now
>>> every alternate day, we are seeing this. We're using 16GB RAM Web Server
>> (2
>>> servers) and can see 1k-1.5k users connected to the application in a day.
>>
>> Please post your <Connector> configuration, minus any secrets.
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 

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


Re: Many CLOSE_WAIT connections causing the app not available

Posted by Stephen Stevie <ar...@gmail.com>.
Tomcat not configured on default port
<Connector port="9210" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="65536"
maxPostSize="-1" maxSavePostSize="-1"/>

 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
tomcatAuthentication="false" emptySessionPath="true" enableLookups="false"
URIEncoding="UTF-8" packetSize="65536" />

On Thu, Jun 27, 2024 at 9:58 PM Christopher Schultz <
chris@christopherschultz.net> wrote:

> Stephen,
>
> On 6/26/24 01:18, Stephen Stevie wrote:
> > We are using Apache Tomcat 8.5.49 and sometimes in a day, we see the
> > application is going unresponsive though the service is up and running
> and
> > giving 503 (service unavailable error). When netstat for the port is run,
> > we see many CLOSE_WAIT connections. Once we restart the service, the
> > application is coming back and sometimes this comes back on its own.
> >
> > We have not made any changes to Tomcat in recent times and it was working
> > fine until the start of this year. After that, it was once a month and
> now
> > every alternate day, we are seeing this. We're using 16GB RAM Web Server
> (2
> > servers) and can see 1k-1.5k users connected to the application in a day.
>
> Please post your <Connector> configuration, minus any secrets.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

-- 
Stephen

Re: Many CLOSE_WAIT connections causing the app not available

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Stephen,

On 6/26/24 01:18, Stephen Stevie wrote:
> We are using Apache Tomcat 8.5.49 and sometimes in a day, we see the
> application is going unresponsive though the service is up and running and
> giving 503 (service unavailable error). When netstat for the port is run,
> we see many CLOSE_WAIT connections. Once we restart the service, the
> application is coming back and sometimes this comes back on its own.
> 
> We have not made any changes to Tomcat in recent times and it was working
> fine until the start of this year. After that, it was once a month and now
> every alternate day, we are seeing this. We're using 16GB RAM Web Server (2
> servers) and can see 1k-1.5k users connected to the application in a day.

Please post your <Connector> configuration, minus any secrets.

-chris

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


Re: Many CLOSE_WAIT connections causing the app not available

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Stephen,

On 6/26/24 09:31, Chuck Caldarale wrote:
> 
>> On Jun 26, 2024, at 00:18, Stephen Stevie
>> <ar...@gmail.com> wrote:
>> 
>> We are using Apache Tomcat 8.5.49
> 
> 
> Stop right there. Tomcat 8.5.x reached end-of-life earlier this year
> and is no longer supported. The particular version you’re running is
> over 4.5 years old, and many, many security and correctness fixes
> have been implemented since. You really need to upgrade to a
> supported version ASAP.

+1

I would say using Tomcat 8.5.100 should be okay for "a little while" as 
long as you have a plan to upgrade to something past 8.5.

I haven't heard a single complaint from anyone who upgraded from 8.5 to 
9.0 unless they were doing something out of the ordinary.

But you should really have a plan in-place NOW for moving to a supported 
version of Tomcat.

And using 8.5.49 is a really *really* bad idea for exactly the reasons 
Chuck has described above.

-chris

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


Re: Many CLOSE_WAIT connections causing the app not available

Posted by Stephen Stevie <ar...@gmail.com>.
This was working fine for the last 2-3 years and no change in the server
configs at all. This started all of a sudden.

On Wed, Jun 26, 2024 at 7:02 PM Chuck Caldarale <n8...@gmail.com> wrote:

>
> > On Jun 26, 2024, at 00:18, Stephen Stevie <ar...@gmail.com>
> wrote:
> >
> > We are using Apache Tomcat 8.5.49
>
>
> Stop right there. Tomcat 8.5.x reached end-of-life earlier this year and
> is no longer supported. The particular version you’re running is over 4.5
> years old, and many, many security and correctness fixes have been
> implemented since. You really need to upgrade to a supported version ASAP.
>
>   - Chuck
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

-- 
Stephen

Re: Many CLOSE_WAIT connections causing the app not available

Posted by Chuck Caldarale <n8...@gmail.com>.
> On Jun 26, 2024, at 00:18, Stephen Stevie <ar...@gmail.com> wrote:
> 
> We are using Apache Tomcat 8.5.49


Stop right there. Tomcat 8.5.x reached end-of-life earlier this year and is no longer supported. The particular version you’re running is over 4.5 years old, and many, many security and correctness fixes have been implemented since. You really need to upgrade to a supported version ASAP.

  - Chuck


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