Re: CLOSE_WAIT pileup and Application Timeout

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
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 18:37:18
Message-ID: 202410061837.u5y5zwsxcpfb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-Oct-04, KK CHN wrote:

> The mobile tablets are installed with the android based vehicle
> tracking app which updated every 30 seconds its location fitted inside the
> vehicle ( lat long coordinates) to the PostgreSQL DB through the java
> backend application to know the latest location of the vehicle and its
> movement which will be rendered in a map based front end.
>
> The vehicles on the field communicate via 443 to 8080 of the Wildfly
> (version 27 ) deployed with the vehicle tracking application developed with
> Java(version 17).

It sounds like setting TCP keepalives in the connections between the
Wildfly and the vehicles might help get the number of dead connections
down to a reasonable level. Then it's up to Wildfly to close the
connections to Postgres in a timely fashion. (It's not clear from your
description how do vehicle connections to Wildfly relate to Postgres
connections.)

I wonder if the connections from Wildfly to Postgres use SSL? Because
there are reported cases where TCP connections are kept and accumulate,
causing problems -- but apparently SSL is a necessary piece for that to
happen.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Thou shalt study thy libraries and strive not to reinvent them without
cause, that thy code may be short and readable and thy days pleasant
and productive. (7th Commandment for C Programmers)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message veem v 2024-10-06 19:11:24 Question on pg_stat* views
Previous Message Adrian Klaver 2024-10-06 15:52:46 Re: CLOSE_WAIT pileup and Application Timeout