Protect process from OOM killer in Jail


New Member

Messages: 1


Does anybody know how to protect daemon in jail from OOM Killer?
I tried to set mysql_oomprotect to YES in rc.conf in Jail but it doesn't work.




Reaction score: 352
Messages: 1,170

The OOM protection is done by procctl(2) in the background used by the protect(1) command. This tracing is not allowed in jails for security reasons.

If you're running out of memory you have bigger issues. But let's say you have a corner case where you are testing something and you do want to achieve what you've asked. From top of my head I'd say run the protect command on host as follows # protect -p $<pid of mysql daemon>.