Contrary to what the ruby documentation says, sending a signal
to PID 0 actually signals the whole process group, not just the
current process. So use Process.pid to make sure we only signal
the current process.
# Restart if we've hit our memory limit
if resident_size > SOFT_MEMORY_LIMIT
# Restart if we've hit our memory limit
if resident_size > SOFT_MEMORY_LIMIT
- Process.kill("USR1", 0)
+ Process.kill("USR1", Process.pid)
end
# Return the result of this request
end
# Return the result of this request