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 1swkWY-005qUw-1y for pgsql-general@arkaria.postgresql.org; Fri, 04 Oct 2024 15:47:22 +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 1swkWX-001mmh-A4 for pgsql-general@arkaria.postgresql.org; Fri, 04 Oct 2024 15:47:21 +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 1swkWW-001mmZ-V2 for pgsql-general@lists.postgresql.org; Fri, 04 Oct 2024 15:47:20 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swkWP-002Wr0-1c for pgsql-general@postgresql.org; Fri, 04 Oct 2024 15:47:20 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 26D9513801D0; Fri, 4 Oct 2024 11:47:13 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 04 Oct 2024 11:47:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1728056833; x=1728143233; bh=S11jeWUo/iJ4aZSAPexJ7XhYxXZ6U+NDBcuM/8aEGlQ=; b= KdpgR6W9C0TdoTY3ygeYCSvSH69aecb/SU0+UJ0hsREGmjin/wwrtIuFjgkhhLfo tBxSXt9S5r3tiKR4j+O7iVkuwlpZrbfpvzCICGO8H+I9PbF5DKYHubAJFKy6eo81 CfFYcACCFw9ahRvfaG+AEX8C8RDyW0zBcgo5Aa9t3Ui8SQ11ggyhaFhKTgxCIQs/ qKapQeDmdr3Clk22YkrC5NuTSP00vaaDrPVPSIGiVH51RSBWeHrzcL6fM0D/HX8R /0BJ4mFDB78Z5IaHx18KkhewDw4axgu14pYoGLvZzQPXd8UY9AqZt4PZ4zASbgnU MnTqcBKV63ZBBhN89OSbXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728056833; x= 1728143233; bh=S11jeWUo/iJ4aZSAPexJ7XhYxXZ6U+NDBcuM/8aEGlQ=; b=X GFHKg3hB7SKiv/srPaiXnc3Mn6YN8SvEcTzA5MGWetHzZ3JG1zxGR2h2ZujiNzxU DSb/3CH0aKnGRfG57aOPvBy5Zn+xlbAFkWsYh9K45LDCLrAG5uIaWYDAXhiGmnqR XHl+tuhLmXKAckLsNC/S4mh/6sPLBdOuWNCxQcMuM4bLuM1Bju2jSrwxkSmUPT01 OWcJ8HX7SYqNc8Hj1Nr6fePcCETg2qNlwUB3ehKnGWVty70JMZKwNfMpugCru+Oq Uo7XFoZlF4kLdXTWcscJ5IsU7abmT0PTE33i5hn/aaRbeKuWazvv97gxGub8mrDp HKSQJBDLXR/MrKNkbfkPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvfedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghr uceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrth htvghrnhepffelgeeifefgveduhedthfekuedtffejveegffegjeevtdehgfduieetfeeh jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg gurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhhktghhnhdrihhnsehgmhgrih hlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghs qhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Oct 2024 11:47:12 -0400 (EDT) Message-ID: Date: Fri, 4 Oct 2024 08:47:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: CLOSE_WAIT pileup and Application Timeout To: KK CHN , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.klaver@aklaver.com