I need to increase the stack limit on Ubuntu 18.04 permanently, such that the new limit is in place for all users in all circumstances. Thus, setting in with ulimit -s ...
, including in Bash profile and similar solutions, will not work for me. I tried:
- Setting the limit in
/etc/security/limits.conf
. This had no effect. I tried setting both hard and soft limits, for root and my user. Restarted. Nothing changes. - Set
DefaultLimitSTACK=32768
in/etc/systemd/system.conf
and/etc/systemd/user.conf
. 32768 is the desired stack limit in Kb. The window manager wouldn't load after restart, instead I was dropped into some kind of emergency root shell, where most commands segfaulted as well. I interpreted it as the stack limit being set to 32Kb instead of 32Mb as intended. - Set
DefaultLimitSTACK=33554432
in/etc/systemd/system.conf
and/etc/systemd/user.conf
. The system loads normally,ulimit -s
still shows 8192, nothing changed.
Could someone advise how to make this work? Thank you!