i have a binary, which indexes some stuff, it eats all my ram and my swap. Then the server hangs.
I would like to limit its ram usage.
I've looking at cpulimit and /etc/security/limits.conf but both of them focus on cpu limits and user/processes .
Have somebody limited the usage of a certain binary? How can I approach this issue?
Thanks
Use
ulimit
. In particularulimit -m
.limits.conf
has several entries to limit memory usage you may consider, i.e.data
,rss
,stack
.