Skip to content

Commit

Permalink
[Ubuntu] Set DefaultLimitSTACK=16384 limit (#3328)
Browse files Browse the repository at this point in the history
* Set DefaultLimitSTACK=16384 limit

* Set DefaultLimitSTACK 16MB
  • Loading branch information
al-cheb authored May 6, 2021
1 parent 5abc43a commit a5fca05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions images/linux/scripts/base/limits.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash -e

echo '* soft nofile 65536' >> /etc/security/limits.conf
echo '* hard nofile 65536' >> /etc/security/limits.conf
echo 'session required pam_limits.so' >> /etc/pam.d/common-session
echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive
echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf
echo 'DefaultLimitSTACK=16M:infinity' >> /etc/systemd/system.conf

# Raise Number of File Descriptors
echo '* soft nofile 65536' >> /etc/security/limits.conf
echo '* hard nofile 65536' >> /etc/security/limits.conf

# Double stack size from default 8192KB
echo '* soft stack 16384' >> /etc/security/limits.conf
Expand Down

0 comments on commit a5fca05

Please sign in to comment.