From 96d947779ce63f31191a2cb00e30e8ab97eb1d35 Mon Sep 17 00:00:00 2001 From: Andrey Mishechkin Date: Wed, 29 Jan 2020 16:14:44 +0400 Subject: [PATCH 1/2] [DefaultLimitNOFILE=50000] setting has been added to /etc/systemd/system.conf --- images/linux/ubuntu1604.json | 3 ++- images/linux/ubuntu1804.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index bca6a3ed..8fda5511 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -79,7 +79,8 @@ "systemctl disable apt-daily-upgrade.service", "echo '* soft nofile 50000 \n* hard nofile 50000' >> /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 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive", + "echo 'DefaultLimitNOFILE=50000' >> /etc/systemd/system.conf" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 5c57731d..5dc084db 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -82,7 +82,8 @@ "systemctl disable apt-daily-upgrade.service", "echo '* soft nofile 50000 \n* hard nofile 50000' >> /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 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive", + "echo 'DefaultLimitNOFILE=50000' >> /etc/systemd/system.conf" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, From 4e72032c3c54c3a3ddb2d62af6f121f54967aa96 Mon Sep 17 00:00:00 2001 From: Andrey Mishechkin Date: Fri, 31 Jan 2020 10:59:30 +0400 Subject: [PATCH 2/2] Max files limit has been changed from 50000 to 65536 --- images/linux/ubuntu1604.json | 4 ++-- images/linux/ubuntu1804.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 8fda5511..73d96e83 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -77,10 +77,10 @@ "systemctl disable apt-daily.timer", "systemctl disable apt-daily-upgrade.timer", "systemctl disable apt-daily-upgrade.service", - "echo '* soft nofile 50000 \n* hard nofile 50000' >> /etc/security/limits.conf", + "echo '* soft nofile 65536 \n* 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=50000' >> /etc/systemd/system.conf" + "echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 5dc084db..dcf2ae54 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -80,10 +80,10 @@ "systemctl disable apt-daily.timer", "systemctl disable apt-daily-upgrade.timer", "systemctl disable apt-daily-upgrade.service", - "echo '* soft nofile 50000 \n* hard nofile 50000' >> /etc/security/limits.conf", + "echo '* soft nofile 65536 \n* 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=50000' >> /etc/systemd/system.conf" + "echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" },