Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOTgv-0003vD-1a for pgsql-general@arkaria.postgresql.org; Wed, 08 May 2019 21:01:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hOTgs-0004l2-3y for pgsql-general@arkaria.postgresql.org; Wed, 08 May 2019 21:01:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOTgr-0004dw-A5 for pgsql-general@lists.postgresql.org; Wed, 08 May 2019 21:01:25 +0000 Received: from mail-oln040092011101.outbound.protection.outlook.com ([40.92.11.101] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOTgn-0001Y7-Dk for pgsql-general@lists.postgresql.org; Wed, 08 May 2019 21:01:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ujlMTI7H4IC/6PuHr6nGJvYk/SR62nVfdqphhJp8Hk0=; b=G1V8naNDDw2lYJExOpSdpDJTxX8VF4B5qYVHFbBvLg41Zj2zhW3UwsttKx8SFFF112/waqkxl/GZR3RMWbCorP/Gmj1QlvQFTSDtTYxJFoPNsmKoLQhTsGtc7dWg7oQHzPKQKm9cEBDpcOzwelp0Bt47FjNEbn7HFtgJGiWktvt4CXw6fiwTrUkbdEBMSWlG4XuD/yRU2RARIJ1xTzjWPIHeCDaBLAh0rhv8VD2W/YVEDUBCdkBVonLSD1ZS/ZgkQMZ9p3ebD1+DbHmVmZ23HcdLDszqrVEN7OCy73FBtt/BQuqRF58wZpg2E/+qxySIeX2xj2gPrbCOROvNjt4NCw== Received: from BN3NAM04FT013.eop-NAM04.prod.protection.outlook.com (10.152.92.56) by BN3NAM04HT171.eop-NAM04.prod.protection.outlook.com (10.152.93.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.15; Wed, 8 May 2019 21:01:18 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com (10.152.92.51) by BN3NAM04FT013.mail.protection.outlook.com (10.152.92.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.15 via Frontend Transport; Wed, 8 May 2019 21:01:18 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::48b1:b5b3:66d1:7ac7]) by BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::48b1:b5b3:66d1:7ac7%2]) with mapi id 15.20.1856.012; Wed, 8 May 2019 21:01:18 +0000 From: Julie Nishimura To: Adrian Klaver CC: "pgsql-general@lists.postgresql.org" , pgsql-general Subject: Re: postgresql 9.4 restart Thread-Topic: postgresql 9.4 restart Thread-Index: AQHVBcfma83KtDbVuEyo1YNjnlTS8qZhlxkAgAAfG3c= Date: Wed, 8 May 2019 21:01:18 +0000 Message-ID: References: <87o94ducuk.fsf@gmail.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:365827C0AC5A2F21D0A595D5E2237CFAF78A670E2C0D85374A6C50967CDC62C1;UpperCasedChecksum:51F8862E1CEA50A069A691EFC2AF27E3D20C49D446CA1C8458B6FA8C37BB6FB9;SizeAsReceived:7060;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [h8rlfvpn0rN81ue5o9BC7dKhYuCTGpyA] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:BN3NAM04HT171; x-ms-traffictypediagnostic: BN3NAM04HT171: x-microsoft-antispam-message-info: 9jenFmEJntoMAhqUfSjX9zgNQhioMycvzNrhyw2Qod05p06jEOGlxVsa/e5BjbH+G3r+OjuZ+RSgBA73kts8l1P90ezKsjaZUCG6MkkvYhH/SmD3jrCpFxN8EDThbZ/DXStxqhv2Vc4/SO9+a5r/jrf/7eaNAFCDYCRJfspMjMGpfvsT8+zTgaw+4NJIytNn Content-Type: multipart/alternative; boundary="_000_BYAPR08MB5014705957F8AFFFCBDA44B9AC320BYAPR08MB5014namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 0f2a703e-197e-45c8-da30-08d6d3f85123 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 21:01:18.4857 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3NAM04HT171 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR08MB5014705957F8AFFFCBDA44B9AC320BYAPR08MB5014namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Adrian, thanks for your reply! PostgreSQL 9.4.21 on x86_64-pc-linux-gnu (Ubuntu 9.4.21-1.pgdg16.04+1), com= piled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609, 64-bit This is what Ive found in logs prior to the restart: 2019-05-07 00:08:26.771 UTC,,,8677,"10.200.193.58:49428",5cd0cc7a.21e5,1,""= ,2019-05-07 00:08:26 UTC,,0,LOG,00000,"connection received: host=3D10.200.1= 93.58 port=3D49428",,,,,,,,,"" 2019-05-07 00:08:26.772 UTC,"hitwise","hitwise_us_stg",8677,"10.200.193.58:= 49428",5cd0cc7a.21e5,2,"authentication",2019-05-07 00:08:26 UTC,448/970,0,L= OG,00000,"connection authorized: user=3Dhitwise database=3Dhitwise_us_stg",= ,,,,,,,,"" 2019-05-07 00:08:26.772 UTC,"hitwise","hitwise_us_stg",8677,"10.200.193.58:= 49428",5cd0cc7a.21e5,3,"startup",2019-05-07 00:08:26 UTC,448/970,0,FATAL,53= 300,"remaining connection slots are reserved for non-replication superuser = connections",,,,,,,,,"" 2019-05-07 00:08:26.778 UTC,"hitwise","hitwise_us_stg",8675,"10.200.193.58:= 49424",5cd0cc7a.21e3,6,"idle",2019-05-07 00:08:26 UTC,,0,LOG,00000,"disconn= ection: session time: 0:00:00.021 user=3Dhitwise database=3Dhitwise_us_stg = host=3D10.200.193.58 port=3D49424",,,,,,,,,"" 2019-05-07 00:08:26.779 UTC,"hitwise","hitwise_us_stg",8676,"10.200.193.58:= 49426",5cd0cc7a.21e4,6,"idle",2019-05-07 00:08:26 UTC,,0,LOG,00000,"disconn= ection: session time: 0:00:00.018 user=3Dhitwise database=3Dhitwise_us_stg = host=3D10.200.193.58 port=3D49426",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,,,4117,,5cbfb2c9.1015,5,,2019-04-24 00:50:17 UT= C,,0,LOG,00000,"received fast shutdown request",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,,,4117,,5cbfb2c9.1015,6,,2019-04-24 00:50:17 UT= C,,0,LOG,00000,"aborting any active transactions",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg",8558,"10.200.193.58:= 49246",5cd0cc20.216e,6,"idle",2019-05-07 00:06:56 UTC,54/0,0,FATAL,57P01,"t= erminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg",8559,"10.200.193.58:= 49248",5cd0cc20.216f,6,"idle",2019-05-07 00:06:56 UTC,56/0,0,FATAL,57P01,"t= erminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg",8561,"10.200.193.58:= 49252",5cd0cc20.2171,6,"idle",2019-05-07 00:06:56 UTC,429/0,0,FATAL,57P01,"= terminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_au_stg",8578,"10.200.250.49:= 31100",5cd0cc33.2182,6,"idle",2019-05-07 00:07:15 UTC,19/0,0,FATAL,57P01,"t= erminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_us_stg",8626,"10.200.250.49:= 31332",5cd0cc61.21b2,6,"idle",2019-05-07 00:08:01 UTC,3/0,0,FATAL,57P01,"te= rminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg",8560,"10.200.193.58:= 49250",5cd0cc20.2170,6,"idle",2019-05-07 00:06:56 UTC,227/0,0,FATAL,57P01,"= terminating connection due to administrator command",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg",8558,"10.200.193.58:= 49246",5cd0cc20.216e,7,"idle",2019-05-07 00:06:56 UTC,,0,LOG,00000,"disconn= ection: session time: 0:01:31.339 user=3Dhitwise database=3Dhitwise_uk_stg = host=3D10.200.193.58 port=3D49246",,,,,,,,,"" 2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_au_stg",8578,"10.200.250.49:= 31100",5cd0cc33.2182,7,"idle",2019-05-07 00:07:15 UTC,,0,LOG,00000,"disconn= ection: session time: 0:01:12.215 user=3Dhitwise database=3Dhitwise_au_stg = host=3D10.200.250.49 port=3D31100",,,,,,,,,"" Does it help? ________________________________ From: Adrian Klaver Sent: Wednesday, May 8, 2019 12:07 PM To: Julie Nishimura Cc: pgsql-general@lists.postgresql.org; pgsql-general Subject: Re: postgresql 9.4 restart On 5/8/19 11:00 AM, Julie Nishimura wrote: > Hello, > Our staging 9.4 postgresql has been running couple of weeks with no > problem, but yesterday we saw this error from one of our services that > connects to the staging DBs: > > FATAL: terminating connection due to > administrator command; nested exception is > org.postgresql.util.PSQLException: FATAL: terminating connection due to > administrator command=94, Distro and version? Well it originated in Java code if that helps? Anything in the Postgres logs just prior to 'FATAL: terminating connection ...' that might be relevant? Do the system logs showing anything relevant e.g. the OOM killer stopping Postgres? > > Then I could see that postgresql got restarted, based on the output of > "select pg_postmaster_start_time()" > > We are running postgresql on > Linux xxx-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 > x86_64 x86_64 GNU/Linux > > How I can find out what cause the restart? Any ideas are welcome. Thanks! > > -Julie N > > -- Adrian Klaver adrian.klaver@aklaver.com --_000_BYAPR08MB5014705957F8AFFFCBDA44B9AC320BYAPR08MB5014namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Adrian, thanks for your reply!



PostgreSQL 9.4.21 on x86_64-pc-linux-gnu (Ubuntu 9.4.21-1.pgdg16.04+1),= compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609, 64-bit

This is what Ive found in logs prior to the restart:
2019-05-07 00:08:26.771 UTC,,,8677,"10.200.193.58:49428",5c= d0cc7a.21e5,1,"",2019-05-07 00:08:26 UTC,,0,LOG,00000,"conne= ction received: host=3D10.200.193.58 port=3D49428",,,,,,,,,""= ;
2019-05-07 00:08:26.772 UTC,"hitwise","hitwise_us_stg&q= uot;,8677,"10.200.193.58:49428",5cd0cc7a.21e5,2,"authenticat= ion",2019-05-07 00:08:26 UTC,448/970,0,LOG,00000,"connection auth= orized: user=3Dhitwise database=3Dhitwise_us_stg",,,,,,,,,""=
2019-05-07 00:08:26.772 UTC,"hitwise","hitwise_us_stg&q= uot;,8677,"10.200.193.58:49428",5cd0cc7a.21e5,3,"startup&quo= t;,2019-05-07 00:08:26 UTC,448/970,0,FATAL,53300,"remaining connection= slots are reserved for non-replication superuser connections",,,,,,,,= ,""
2019-05-07 00:08:26.778 UTC,"hitwise","hitwise_us_stg&q= uot;,8675,"10.200.193.58:49424",5cd0cc7a.21e3,6,"idle",= 2019-05-07 00:08:26 UTC,,0,LOG,00000,"disconnection: session time: 0:0= 0:00.021 user=3Dhitwise database=3Dhitwise_us_stg host=3D10.200.193.58 port= =3D49424",,,,,,,,,""
2019-05-07 00:08:26.779 UTC,"hitwise","hitwise_us_stg&q= uot;,8676,"10.200.193.58:49426",5cd0cc7a.21e4,6,"idle",= 2019-05-07 00:08:26 UTC,,0,LOG,00000,"disconnection: session time: 0:0= 0:00.018 user=3Dhitwise database=3Dhitwise_us_stg host=3D10.200.193.58 port= =3D49426",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,,,4117,,5cbfb2c9.1015,5,,2019-04-24 00:50:= 17 UTC,,0,LOG,00000,"received fast shutdown request",,,,,,,,,&quo= t;"
2019-05-07 00:08:28.060 UTC,,,4117,,5cbfb2c9.1015,6,,2019-04-24 00:50:= 17 UTC,,0,LOG,00000,"aborting any active transactions",,,,,,,,,&q= uot;"
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg&q= uot;,8558,"10.200.193.58:49246",5cd0cc20.216e,6,"idle",= 2019-05-07 00:06:56 UTC,54/0,0,FATAL,57P01,"terminating connection due= to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg&q= uot;,8559,"10.200.193.58:49248",5cd0cc20.216f,6,"idle",= 2019-05-07 00:06:56 UTC,56/0,0,FATAL,57P01,"terminating connection due= to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg&q= uot;,8561,"10.200.193.58:49252",5cd0cc20.2171,6,"idle",= 2019-05-07 00:06:56 UTC,429/0,0,FATAL,57P01,"terminating connection du= e to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_au_stg&q= uot;,8578,"10.200.250.49:31100",5cd0cc33.2182,6,"idle",= 2019-05-07 00:07:15 UTC,19/0,0,FATAL,57P01,"terminating connection due= to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_us_stg&q= uot;,8626,"10.200.250.49:31332",5cd0cc61.21b2,6,"idle",= 2019-05-07 00:08:01 UTC,3/0,0,FATAL,57P01,"terminating connection due = to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg&q= uot;,8560,"10.200.193.58:49250",5cd0cc20.2170,6,"idle",= 2019-05-07 00:06:56 UTC,227/0,0,FATAL,57P01,"terminating connection du= e to administrator command",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_uk_stg&q= uot;,8558,"10.200.193.58:49246",5cd0cc20.216e,7,"idle",= 2019-05-07 00:06:56 UTC,,0,LOG,00000,"disconnection: session time: 0:0= 1:31.339 user=3Dhitwise database=3Dhitwise_uk_stg host=3D10.200.193.58 port= =3D49246",,,,,,,,,""
2019-05-07 00:08:28.060 UTC,"hitwise","hitwise_au_stg&= quot;,8578,"10.200.250.49:31100",5cd0cc33.2182,7,"idle"= ,2019-05-07 00:07:15 UTC,,0,LOG,00000,"disconnection: session time: 0:= 01:12.215 user=3Dhitwise database=3Dhitwise_au_stg host=3D10.200.250.49 por= t=3D31100",,,,,,,,,""

Does it help?


From: Adrian Klaver <a= drian.klaver@aklaver.com>
Sent: Wednesday, May 8, 2019 12:07 PM
To: Julie Nishimura
Cc: pgsql-general@lists.postgresql.org; pgsql-general
Subject: Re: postgresql 9.4 restart
 
On 5/8/19 11:00 AM, Julie Nishimura wrote:
> Hello,
> Our staging 9.4 postgresql has been running couple of weeks with no > problem, but yesterday we saw this error from one of our services that=
> connects to the staging DBs:
>
> FATAL: terminating connection due to
> administrator command; nested exception is
> org.postgresql.util.PSQLException: FATAL: terminating connection due t= o
> administrator command=94,

Distro and version?

Well it originated in Java code if that helps?

Anything in the Postgres logs just prior to 'FATAL: terminating
connection ...' that might be relevant?

Do the system logs showing anything relevant e.g. the OOM killer
stopping Postgres?



>
> Then I could see that postgresql got restarted, based on the output of=
> "select pg_postmaster_start_time()"
>
> We are running postgresql on
> Linux xxx-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 <= br> > x86_64 x86_64 GNU/Linux
>
> How I can find out what cause the restart? Any ideas are welcome. Than= ks!
>
> -Julie N
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com
--_000_BYAPR08MB5014705957F8AFFFCBDA44B9AC320BYAPR08MB5014namp_--