Re: persistent change of max_stack_depth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Gordon,

On 17/08/15 19:07, Gordon Messmer wrote:
On 08/17/2015 03:34 AM, Michael H wrote:
the [Service] section -
[Service]
LimitSTACK=12288
...
By the errors I will assume that it should be in the [Service] section.
I couldn't find confirmation of this online...

Yes, it belongs in the [Service] section.

$ man systemd.exec
...
"The execution specific configuration options are configured in the
[Service], [Socket], [Mount], or [Swap] sections, depending on the unit
type."

However, I assume that you are confused because "ulimit" in a bash shell
returns a value in KiB, but LimitSTACK and setrlimit accept a value in
bytes.  That is, you've decreased the stack size to 12KiB, which is why
PostgreSQL segfaults immediately.

That is the most valuable piece of information! I couldn't find this documented anywhere, maybe I just looked in the wrong place...


# cat /etc/systemd/system/postgresql.service
.include /lib/systemd/system/postgresql.service
[Service]
LimitSTACK=12582912




# grep stack /var/lib/pgsql/data/postgresql.conf
max_stack_depth = 10MB            # min 100kB

# systemctl daemon-reload
# systemctl restart postgresql
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

Thank you for your help,

Michael
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux