Increase the maximum number of file descriptors

This change increases the number of file descriptors for the Heka process
to 102400. By default it inherits the value from the init process that is
1024. We already hit this value and it has been demonstrated that this
value is too low.

Change-Id: Ib5adcfe8a8c90f21c3aed28db3b9544a3d8edb9a
Closes-Bug: #1543289
(cherry picked from commit 5094fb96ea)
This commit is contained in:
Guillaume Thouvenin 2016-02-25 15:04:15 +01:00 committed by Swann Croiset
parent 58d0d6d7b8
commit a18563ffe6
2 changed files with 8 additions and 1 deletions

View File

@ -14,4 +14,8 @@ pre-start script
end script
<% end -%>
exec <%= @run_as_root ? "" : "sudo -u #{ @heka_user }" %> <%= @hekad_wrapper %> 2>><%= @log_file %>
script
# https://bugs.launchpad.net/lma-toolchain/+bug/1543289
ulimit -n 102400
exec <%= @run_as_root ? "" : "sudo -u #{ @heka_user }" %> <%= @hekad_wrapper %> 2>><%= @log_file %>
end script

View File

@ -245,6 +245,9 @@ service_start() {
return "$OCF_SUCCESS"
fi
# See https://bugs.launchpad.net/lma-toolchain/+bug/1543289
ulimit -n 102400
su "${OCF_RESKEY_user}" -s /bin/sh -c "${OCF_RESKEY_binary} \
-config=${OCF_RESKEY_config} >> $OCF_RESKEY_log_file 2>&1"' & echo $!' > "$OCF_RESKEY_pid"