Re: New PG14 server won't start with >2GB shared_buffers

From: Carlos Martinez <camarti(at)gmail(dot)com>
To: Evan Rempel <erempel(at)uvic(dot)ca>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: New PG14 server won't start with >2GB shared_buffers
Date: 2023-02-25 16:35:08
Message-ID: CA+Mn-VZQcLjGT-9L6Qt6VejM3AKWQzU5966xUq=6F+cwu-kAow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi.

Just for ask dummy questions:

What says the next commands?

cat /etc/*release*
uname -a
ulimit -a # run this as root and postres user

Best regards.

El sáb., 25 de feb. de 2023 10:17 a. m., Evan Rempel <erempel(at)uvic(dot)ca>
escribió:

> Bear in mind that if you are using systemd to start postgres, then these
> user limits may not apply.
>
> Th logged in user limits get set by the PAM subsystem, but when systemd
> starts a subsystem no actual login occurs and PAM is never invoked.
>
> The systemd unit file must have limits set within in.
>
> https://www.freedesktop.org/software/systemd/man/systemd.exec.html
>
> In the [service] section use one of
>
> LimitCPU= Seconds
> LimitFSIZE= Bytes
> LimitSTACK= Bytes
> LimitCORE= Bytes
> LimitRSS= Bytes
> LimitNOFILE= intenger
> LimitAS= Bytes
> LimitNPROC= intenger
> LimitMEMLOCK= Bytes
> LimitLOCKS= intenger
> LimitSIGPENDING= intenger
> LimitMSGQUEUE= Bytes
> LimitNICE= Nice Level
> LimitRTPRIO= Realtime Priority
> LimitRTTIME= Microseconds
>
> On 2023-02-25 06:55, Chris Hoover wrote:
>
>
> Ken,
>
> $ id
> uid=998(postgres) gid=1003(postgres) groups=1003(postgres),115(ssl-cert)
> $ ulimit -a
> core file size (blocks, -c) 0
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 4128123
> max locked memory (kbytes, -l) 65536
> max memory size (kbytes, -m) unlimited
> open files (-n) 1024
> pipe size (512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority (-r) 0
> stack size (kbytes, -s) 8192
> cpu time (seconds, -t) unlimited
> max user processes (-u) 4128123
> virtual memory (kbytes, -v) unlimited
> file locks (-x) unlimited
>
> $ sysctl -a | grep shm
> kernel.shm_next_id = -1
> kernel.shm_rmid_forced = 0
> kernel.shmall = 17179869184
> kernel.shmmax = 274877906944
> kernel.shmmni = 4096
>
> Thanks,
>
>
> Chris Hoover
> Senior DBA
> AWeber.com
> Cell: (803) 528-2269
> Email: chrish(at)aweber(dot)com
>
>
>
> On Feb 25, 2023, at 9:49 AM, Kenneth Marshall <ktm(at)rice(dot)edu>
> <ktm(at)rice(dot)edu> wrote:
>
> Chris Hoover wrote on 2/25/2023 8:07 AM:
>
> Ron,
>
> Honestly, I grabbed 500MB to get the database up, by this time I
> was very frustrated and just wanted it up. :) I think I was at
> 1500MB and it still would not start. So to save what was left of
> my evening out, I just picked 500.
>
> Here is shmall:
> kernel.shmall = 17179869184
>
> Thanks,
>
>
> Chris Hoover
> Senior DBA
> AWeber.com
> Cell: (803) 528-2269
> Email: chrish(at)aweber(dot)com
>
>
> Hi Chris,
>
> What are your limits set to for the account that the database runs as?
>
> Regards,
> Ken
>
>
>
> --
> Evan Rempel 250.721.7691
> Senior Systems Administrator erempel(at)uvic(dot)ca
> Data Centre Services, University Systems, University of Victoria
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2023-02-25 16:35:17 Re: New PG14 server won't start with >2GB shared_buffers
Previous Message Evan Rempel 2023-02-25 15:16:55 Re: New PG14 server won't start with >2GB shared_buffers