ocserv-main should set /proc/<pid>/oom_score_adj on the worker process to kill worker processes by preference
When a system running with ocserv is under heavy load, the Linux kernel can invoke the oom_reaper, which will select processes to be reaped to maintain system stability.
The kernel takes into account the processes /proc//oom_score and oom_score_adj when determining which process to kill.
Ocserv should set oom_score_adj to a high value on the worker processes so that they get reaped before the ocserv-main or ocserv-sm process.
If we don't the kernel kills ocserv-sm first:
2020-04-08T22:36:53.616058980Z ocserv: main: main.c:927: Sec-mod 14 died with signal 9 2020-04-08T22:36:53.616062280Z ocserv: main: main.c:931: ocserv-secmod died unexpectedly
Which causes all client connections to be dropped.