Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sxW8I-00Aaz5-0O for pgsql-general@arkaria.postgresql.org; Sun, 06 Oct 2024 18:37:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sxW8G-000KJ3-8b for pgsql-general@arkaria.postgresql.org; Sun, 06 Oct 2024 18:37:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sxW8E-000KIv-Ou for pgsql-general@lists.postgresql.org; Sun, 06 Oct 2024 18:37:27 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sxW8A-002ttj-O0 for pgsql-general@postgresql.org; Sun, 06 Oct 2024 18:37:25 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3A41111400D5; Sun, 6 Oct 2024 14:37:20 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Sun, 06 Oct 2024 14:37:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728239840; x= 1728326240; bh=RzkztPD/70mZhJpeNfFlsxemSc1wkKdn4OOIeHTAIE4=; b=P mqWi0MD8vNWqj8DLBd7kBZqt8IVYVnnDZVoeZjF1lmjqBIIb6fmlhGnBv221Fbf+ Uf+S3WYr1D1UlRTMerfE4unG/Rw59tzpmkHIPCt5p9NKqQsS9vlV3ndDgBRaCHYL wISb3zab6DDkkHgXgE+nvxnX4FXs9sSotZIjC3SYfZiBEqul3mW6OEdYOg+/p2ah mqVEpMnBPNNBzgtleIbQ030p5OixSzLLhgHGA3HpEYWVV2hM9zt6iu0N5OPeV8b2 fAbHgsCp6PgEP8SfJDziN1nTEECaLeMScNG93w9jxwkmbPsYcS0X6JgjuZNr4vj/ UxgivsSnCzQ1w53h3EdIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvjedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf evuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgv rhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrth htvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeekfffgudffhfduffff ueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehkkhgthhhnrdhinhesghhmrghilhdrtghomhdprhgtphhtthho pehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 6 Oct 2024 14:37:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1728239838; bh=MMjfRE/Abl9fifMsexB/9dFJdxNjS43nMKVFaSfntQo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ON7FUmVjAWDMSBsWFJfJMrtjbxLOWOO2S4v2C8WwKW/QZJpdJgc5Xq/G+feDJhb3G WXLN5HtyBJCk9rE0BmHk1DcNe5m7cNtNXWTkTwKgkZsxFoE01lT2PsAePu7Aw0hFj6 y5kpg1Tiu9kgqJzg4H9mKpYUxALDtol0oRcqqcW6WNqHpQ2WtOeDz3+WAlXVA00rzE md1FQULqpy7CRark4JWEz1QhNTmtR4jVmkvRhe0M/dHScxqxRcYazB0iYIrr9Q2nk+ zEee5WYB57NmKjzy7leLkLaeiBufebCRRfciixmSeRvERK/VhTsRYPkecuVwiFFb7T kOnLSq5QvjXCA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 3E187AC; Sun, 6 Oct 2024 20:37:18 +0200 (CEST) Date: Sun, 6 Oct 2024 20:37:18 +0200 From: Alvaro Herrera To: KK CHN Cc: pgsql-general Subject: Re: CLOSE_WAIT pileup and Application Timeout Message-ID: <202410061837.u5y5zwsxcpfb@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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)