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>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: CLOSE_WAIT pileup and Application Timeout
Date: 2024-10-06 15:52:46
Message-ID: 6ca1ca9f-fdcf-436c-bf2a-800107f6004b@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/6/24 06:26, KK CHN wrote:
>
>
> On Fri, Oct 4, 2024 at 9:17 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com

> 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?
>
> its from mobile devices to application server.  When I do a restart of
> application server everything backs to normal.  But after a period of
> time again it cripples.  That time when I netstat on Application VM lots
> of  CLOSE_WAIT states as indicated.
>
> I'm
> guessing the latter as I would expect the mobile devices to drop
> connections more often then weekly.
>
> Yes mobile devices may drops connections at any point of time if it
> reaches an area where signal strength is poor( eg; Underground
> parking or near the areas where mobile data coverage is poor.
> >
>
>
> The topology is mobile devices  connect and update the location via
> application VM then   finally in  PGSQL VM.
>
> The application server and  Database server both separate virtual
> machines.      Application server hangs most often not the database VM.
> Since there are other applications which update to the database VM
> without any issue.  The DB VM caters all the writes from other
> applications. But those applications are different, not fleet management
> one.

From what I see this really has nothing to do with the Postgres
backend. It is a matter of communication, actually lack of
communication, between the mobile devices and the application server. A
broad answer is that something needs to be done to gracefully deal with
mobile device connection drops

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2024-10-06 18:37:18 Re: CLOSE_WAIT pileup and Application Timeout
Previous Message KK CHN 2024-10-06 13:26:11 Re: CLOSE_WAIT pileup and Application Timeout