Re: CLOSE_WAIT pileup and Application Timeout

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: KK CHN <kkchn(dot)in(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: CLOSE_WAIT pileup and Application Timeout
Date: 2024-10-04 15:47:11
Message-ID: eb332b40-4afb-4394-9ac5-680521ee7f67@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/3/24 21:29, KK CHN wrote:
> List,
>
> I am facing a  network (TCP IP connection closing issue) .
>
> Running a  mobile tablet application, Android application to update the
> status of vehicles fleet say around 1000 numbers installed with the app
> on each vehicle along  with a  vehicle tracking  application server
> solution based on Java and Wildfly with  PosrgreSQL16 backend.
>

>
> The  running vehicles may disconnect  or be unable to send the location
> data in between if the mobile data coverage is less or absent in a
> particular area where data coverage is nil or signal strength less.
>
> The server on which the backend application runs most often ( a week's
> time  or so) shows connection timeout and is unable to serve tracking
> of  the vehicles further.
>
> When we restart the  Wildfly server  the application returns to normal.
> again the issue repeats  after a week or two.

Seems the issue is in the application server. What is not clear to me is
whether the connection timeout you refer to is from the mobile devices
to the application or the application to the Postgres server? I'm
guessing the latter as I would expect the mobile devices to drop
connections more often then weekly.
>
> In the Server machine when this bottleneck occurs  I am seeing  a lot
> of  TCP/IP CLOSE_WAIT   ( 3000 to 5000 ) when the server backend becomes
> unresponsive.

Again not clear, are you referring to the application or the Postgres
database running on the server?

>
> What is the root cause of this issue ?   Is it due to the android
> application unable to send the CLOSE_WAIT ACK due to poor mobile data
> connectivity ?
>
>
>  If so, how do people  address this issue ?  and what may be a fix ?
>
>  Any  directions / or reference material most welcome.
>
> Thank you,
> Krishane
>
>
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Corbin Cavolt 2024-10-04 16:35:14 Error Building Postgres 17.0 from Source
Previous Message Adrian Klaver 2024-10-04 15:40:15 Re: How to troubleshoot: ERROR: cache lookup failed for type?