--- deliantra/server/ext/checkrusage.ext 2010/05/14 22:56:47 1.7 +++ deliantra/server/ext/checkrusage.ext 2016/11/16 22:14:05 1.9 @@ -2,7 +2,8 @@ # restart server when certain resource limits are exceeded -our $MAX_VMSIZE = $cf::CFG{checkrusage}{vmsize} || 1_000_000_000; +# TODO, CONF framework? +our $MAX_VMSIZE = $cf::CFG{checkrusage}{vmsize} || 1_000_000_000; $^O eq "linux" or die "only linux supported right now.\n"; @@ -19,7 +20,7 @@ sysread $STAT_FH, my $stat, 4096; # only a single line my $vmsize = (split / /, $stat)[22]; - cf::cleanup "memory usage growing high, server would run out of memory soon", 0 + cf::cleanup "memory usage growing high ($vmsize > $MAX_VMSIZE), server would run out of memory soon", 0 if $vmsize >= $MAX_VMSIZE; }; };