Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mM9Kz-0003Mj-76 for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Sep 2021 13:34:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mM9Kw-0005iR-GP for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Sep 2021 13:34:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mM9Kv-0005iI-T4 for pgsql-bugs@lists.postgresql.org; Fri, 03 Sep 2021 13:34:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mM9Kt-0003Tc-La for pgsql-bugs@lists.postgresql.org; Fri, 03 Sep 2021 13:34:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 183DYPha2481803; Fri, 3 Sep 2021 09:34:25 -0400 From: Tom Lane To: 66666666nikita@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17179: EOF detected In-reply-to: <17179-100f778969bdc589@postgresql.org> References: <17179-100f778969bdc589@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 03 Sep 2021 05:47:15 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2481801.1630676065.1@sss.pgh.pa.us> Date: Fri, 03 Sep 2021 09:34:25 -0400 Message-ID: <2481802.1630676065@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Query running for more than 30 minutes are disconnected > SELECT pg_sleep(1820) > SSL SYSCALL error: EOF detected Ideally, you'd fix your broken network infrastructure. However, if you can't ... > Increased timeouts tcp_user_timeout, tcp_keepalives_interval didn't help. ... that's exactly backwards about how to work around it. You need to *reduce* the interval at which keepalives are sent. Try setting tcp_keepalives_idle to 10min or so. (At least on my Linux box, it seems to default to 7200s = 2 hours, so that it's no surprise that a router that drops connections after 30 minutes would cause problems.) regards, tom lane