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 1kNGQp-0007m7-Nd for pgsql-general@arkaria.postgresql.org; Tue, 29 Sep 2020 14:16:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNGQo-0004Gu-Fi for pgsql-general@arkaria.postgresql.org; Tue, 29 Sep 2020 14:16:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNGQn-0004Gn-Sm for pgsql-general@lists.postgresql.org; Tue, 29 Sep 2020 14:16:38 +0000 Received: from mail1.dalibo.net ([212.83.143.11] helo=mail.dalibo.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNGQg-0002pW-0Y for pgsql-general@postgresql.org; Tue, 29 Sep 2020 14:16:37 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 23A89201DB; Tue, 29 Sep 2020 16:16:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1601388988; bh=jb2b4u/YwZNF44I75KFwq1AO2CQP2A//au/xsK3Mg28=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PzOIq2WN1zQQKMOI6kiTKmCiPkohtUDCEHkLOjfYuFkUBLatsquIVaM2pOGhLrtZd bPRF8nEC5jXF4R1+fi6VESSLMhFmeFHR2J8rbU139TdA+jzGL1jZZy99+y85tILm0O o86d+t4Tx6RKHXMr+4NXcEdmHFJstWDcKaiucjdQ= Date: Tue, 29 Sep 2020 16:16:27 +0200 From: Jehan-Guillaume de Rorthais To: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= Cc: pgsql-general Subject: Re: BUG? Slave don't reconnect to the master Message-ID: <20200929161627.5dfd2f04@firost> In-Reply-To: <32B9ED9C-0603-47D8-9C5D-0A2461E42971@ya.ru> References: <60590EC6-4062-4F25-A49C-3948ED2A7D47@ya.ru> <20200819150713.326c3532@firost> <52BADD0F-E348-43BB-8992-FDE86F3B1A65@ya.ru> <20200821162642.4245add6@firost> <253962B4-CB29-4A90-A995-17B6047D3876@ya.ru> <20200903133915.1850e955@firost> <8323CF21-D316-4529-BFC3-77C97F8E341B@ya.ru> <20200909171931.64fce7bb@firost> <2045A2B7-E972-44EF-B1D3-B86618FC9780@ya.ru> <20200929113100.70b57e60@firost> <32B9ED9C-0603-47D8-9C5D-0A2461E42971@ya.ru> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 29 Sep 2020 16:22:18 +0300 =D0=9E=D0=BB=D0=B5=D0=B3 =D0=A1=D0=B0=D0=BC=D0=BE=D0=B9=D0=BB=D0=BE=D0=B2 <= splarv@ya.ru> wrote: [...] > > In regards with keepalive parameters, I am a bit surprised. According t= o the > > source code, parameters defaults are: > >=20 > > keepalives=3D1 > > keepalives_idle=3D1 > > keepalives_interval=3D1 > > keepalives_count=3D1 > >=20 > > But I just had a quick look there, so I probably miss something. =20 I did miss something. See bellow. > According to the official documentation, if keepalive parameters are not > specified, then used default value from the OS. > https://www.postgresql.org/docs/12/runtime-config-connection.html#RUNTIME= -CONFIG-CONNECTION-SETTINGS This settings are related to the server side. The one you are setting in primary_conninfo are related to the client side: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWO= RDS > Cite: A value of 0 (the default) selects the operating system's default. >=20 > I don't know what is the default values for the CentOS 7. sysctl -ar net.ipv4.tcp_keepalive_ > I can only assert that adding keepalive is solved issue with Postgres-STOP > test and looked like problems with ForkBomb too. And keep in mind, I still > use PostgreSQL 11. May be 12 or 13 something changed. Sorry, there was some misunderstanding of the source code on my side. The "keepalives" parameter is enabled by default on client side, but if you don= 't set keepalives_idle, keepalives_interval and keepalives_count, they fallbac= k to system default ones which are 7200, 75 and 9 (on Debian and CentOS). So more than 2 hours. Regards,