Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEhTV-0004QZ-Cv for pgsql-admin@arkaria.postgresql.org; Tue, 14 Nov 2017 20:06:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eEhTU-0008RG-VU for pgsql-admin@arkaria.postgresql.org; Tue, 14 Nov 2017 20:06:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eEhRO-00025m-Je for pgsql-admin@postgresql.org; Tue, 14 Nov 2017 20:04:14 +0000 Received: from adriana.opensysperu.com ([2607:5300:60:8392::1004]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eEhRL-0003kt-2b for pgsql-admin@postgresql.org; Tue, 14 Nov 2017 20:04:13 +0000 Received: from localhost (localhost [IPv6:::1]) by adriana.opensysperu.com (Postfix) with ESMTP id 7C5201B0A2; Tue, 14 Nov 2017 15:05:20 -0500 (-05) Received: from adriana.opensysperu.com ([IPv6:::1]) by localhost (adriana.opensysperu.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id ykHQuiVpyM6A; Tue, 14 Nov 2017 15:05:19 -0500 (-05) Received: from localhost (localhost [IPv6:::1]) by adriana.opensysperu.com (Postfix) with ESMTP id 4E9371B0CD; Tue, 14 Nov 2017 15:05:19 -0500 (-05) X-Virus-Scanned: amavisd-new at opensysperu.com Received: from adriana.opensysperu.com ([IPv6:::1]) by localhost (adriana.opensysperu.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id PJW8egEfp94X; Tue, 14 Nov 2017 15:05:19 -0500 (-05) Received: from adriana.opensysperu.com (adriana.opensysperu.com [158.69.30.115]) by adriana.opensysperu.com (Postfix) with ESMTP id 300A41B0A2; Tue, 14 Nov 2017 15:05:19 -0500 (-05) Date: Tue, 14 Nov 2017 15:05:19 -0500 (PET) From: Alvaro Aguayo Garcia-Rada To: Arjun Ranade Cc: pgsql-admin Message-ID: <1284888832.404212.1510689919110.JavaMail.zimbra@opensysperu.com> In-Reply-To: References: <1623340727.404090.1510689186227.JavaMail.zimbra@opensysperu.com> Subject: Re: PG10 - Out of shared memory / invalid memory alloc request size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.18.5.200] X-Mailer: Zimbra 8.6.0_GA_1153 (ZimbraWebClient - GC61 (Linux)/8.6.0_GA_1153) Thread-Topic: PG10 - Out of shared memory / invalid memory alloc request size Thread-Index: MYWgiu0ZuDBdzVr2JtsYhFQvUtBEzw== List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Try with: echo "18446744073709551615" > /proc/sys/kernel/shmax Then restart postgres Regards, Alvaro Aguayo Operations Manager Open Comb Systems E.I.R.L. Office: (+51-1) 3377813 | Mobile: (+51) 995540103 | (+51) 954183248 Web: www.ocs.pe ----- Original Message ----- From: "Arjun Ranade" To: "Alvaro Aguayo Garcia-Rada" Cc: "pgsql-admin" Sent: Tuesday, 14 November, 2017 15:00:03 Subject: Re: [ADMIN] PG10 - Out of shared memory / invalid memory alloc request size /proc/sys/kernel/shmax = 68719476736 On Tue, Nov 14, 2017 at 2:53 PM, Alvaro Aguayo Garcia-Rada < aaguayo@opensysperu.com> wrote: > I remember an old issue I had with postgres and shared memory being set > too low by the distro I was using. > > What's the value of "/proc/sys/kernel/shmmax"? Try setting to > 18446744073709551615 > > Regards, > > Alvaro Aguayo > Operations Manager > Open Comb Systems E.I.R.L. > > Office: (+51-1) 3377813 | Mobile: (+51) 995540103 | (+51) 954183248 > Web: www.ocs.pe > > ----- Original Message ----- > From: "Arjun Ranade" > To: "pgsql-admin" > Sent: Tuesday, 14 November, 2017 14:44:08 > Subject: [ADMIN] PG10 - Out of shared memory / invalid memory alloc > request size > > We recently upgraded a database that a number of developers use from > Postgres 9.4 to 10. Our memory parameters are unchanged. > > We are seeing a lot of errors that look like this in the postgres log: > > < 2017-11-14 13:13:59 EST [144172] : [1-1] > user=[unknown],db=qa16,remote=192.168.104.22(35238) > FATAL: no > PostgreSQL > user name specified in startup packet > < 2017-11-14 13:52:22 EST [6273] : [1-1] > user=deployment_app,db=qa5,remote=192.168.104.83(45384) > ERROR: out of > shared memory > < 2017-11-14 14:17:53 EST [6200] : [3-1] > user=service_tracker_app,db=qa16,remote=192.168.104.22(46996) > ERROR: > invalid memory alloc request size 34359738368 > > Anecdotally it seems that these errors are happening when > powa_take_snapshot() (Postgres workload analyzer) is running as well but I > can't confirm that. > > Does anyone know how to debug these types of errors? And once the db is in > this state, how do we resolve sessions reporting "Error: invalid memory > alloc request size" - killing the sessions and having them reconnect does > not fix the issue. > > Thanks, > Arjun > -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin