Skip to content

Commit

Permalink
chore: increase core size and nofile limits
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield authored and kuoruan committed Feb 24, 2021
1 parent 0bd84cb commit 8c59ad0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions root/etc/init.d/kcptun
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ start_kcptun_instance() {
procd_set_param command "$client_file"
procd_append_param command -c "$config_file"

procd_set_param limits nofile="65535 65535"
if [ -e /proc/sys/kernel/core_pattern ] ; then
procd_append_param limits core="unlimited"
fi

if [ "$mem_percentage" -gt "0" ] ; then
local mem_total="$(awk '/MemTotal/ {print $2}' /proc/meminfo)"
if [ -n "$mem_total" ] ; then
Expand Down

0 comments on commit 8c59ad0

Please sign in to comment.