From 843d5c32b12b00765ceaeb1c88bdf3d23f829cf8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 19 Apr 2019 17:53:57 +0200 Subject: [PATCH] tomcat: put explicit ulitmit commands inside the tomcat instance defaults. See https://support.d4science.org/issues/16588 --- tomcat-multiple-instances/templates/tomcat-default.j2 | 4 ++++ tomcat/templates/tomcat-default.j2 | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/tomcat-multiple-instances/templates/tomcat-default.j2 b/tomcat-multiple-instances/templates/tomcat-default.j2 index 11381459..5f4a81b2 100644 --- a/tomcat-multiple-instances/templates/tomcat-default.j2 +++ b/tomcat-multiple-instances/templates/tomcat-default.j2 @@ -1,3 +1,7 @@ +{% if limits_nofile_value is defined %} +ulimit -Hn {{ limits_nofile_value }} +ulimit -Sn {{ limits_nofile_value }} +{% endif %} TOMCAT_USER={{ item.user }} TOMCAT_GROUP={{ item.user }} JAVA_HOME={{ item.java_home }} diff --git a/tomcat/templates/tomcat-default.j2 b/tomcat/templates/tomcat-default.j2 index ae01e487..e20dc294 100644 --- a/tomcat/templates/tomcat-default.j2 +++ b/tomcat/templates/tomcat-default.j2 @@ -1,3 +1,8 @@ +{% if limits_nofile_value is defined %} +ulimit -Hn {{ limits_nofile_value }} +ulimit -Sn {{ limits_nofile_value }} +{% endif %} + # Run Tomcat as this user ID. Not setting this or leaving it blank will use the # default of tomcat{{ tomcat_version}}. TOMCAT{{ tomcat_version}}_USER={{ tomcat_user }}