Re: PG10 - Out of shared memory / invalid memory alloc request size

From: Arjun Ranade <ranade(at)nodalexchange(dot)com>
To: Alvaro Aguayo Garcia-Rada <aaguayo(at)opensysperu(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PG10 - Out of shared memory / invalid memory alloc request size
Date: 2017-11-14 20:07:18
Message-ID: CANrrCRx=A+rkHcDk9Mcn3FOPZYNgsSUn1zh0tZZ-0heeuxrDBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We will try that. I am wondering why we need to worry about this in pg10
whereas we had no issues with shared memory in 9.4

Thanks,
Arjun

On Tue, Nov 14, 2017 at 3:05 PM, Alvaro Aguayo Garcia-Rada <
aaguayo(at)opensysperu(dot)com> wrote:

> 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" <ranade(at)nodalexchange(dot)com>
> To: "Alvaro Aguayo Garcia-Rada" <aaguayo(at)opensysperu(dot)com>
> Cc: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
> 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(at)opensysperu(dot)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" <ranade(at)nodalexchange(dot)com>
> > To: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
> > 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
> >
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2017-11-14 20:15:29 Re: PG10 - Out of shared memory / invalid memory alloc request size
Previous Message Alvaro Aguayo Garcia-Rada 2017-11-14 20:05:19 Re: PG10 - Out of shared memory / invalid memory alloc request size