Dirty hack, but nothing else available on target server. Added to /etc/crontab:
*/3 * * * * root for line in $(pgrep php-fpm); do echo -950 > /proc/$line/oom_score_adj; done
To check the priority – invoke:
for line in $(pgrep php-fpm); do cat /proc/$line/oom_score_adj; done
Valid values are integers in the range of -1000 to 1000 for oom_score_adj. The lower the value, the lower the chance that it's going to be killed.