Skip to content
This repository was archived by the owner on Jul 15, 2019. It is now read-only.

allow file descriptor limit to be set for jetty #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@
default['jetty']['syslog']['tag'] = ''

default['jetty']['start_ini']['custom'] = false
default['jetty']['start_ini']['content'] = []
default['jetty']['start_ini']['content'] = []

# open file descriptor limit for jetty process
default['jetty']['fd_limit'] = 1024

2 changes: 2 additions & 0 deletions templates/default/jetty-8.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ case "$ACTION" in
exit
fi

ulimit -n <%= node['jetty']['fd_limit'] %>

if type start-stop-daemon > /dev/null 2>&1
then
unset CH_USER
Expand Down
4 changes: 3 additions & 1 deletion templates/default/jetty-9.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ case "$ACTION" in
exit
fi

ulimit -n <%= node['jetty']['fd_limit'] %>

if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1
then
unset CH_USER
Expand Down Expand Up @@ -601,4 +603,4 @@ case "$ACTION" in
;;
esac

exit 0
exit 0