Fix Informix OOM killer

On 32 Bit Linux Informix can crash/panic due to Linux killing the Informix oninit process.

A tipical message in the online log wold be:

“04:32:20  Fatal error in ADM VP at mt.c:13418
04:32:20  Unexpected virtual processor termination, pid = 12502, exit = 0x9
04:32:38  PANIC: Attempting to bring system down”

or

“11:18:15  The Master Daemon Died”

To solve this, we change how Linux handles memory allocations.

Edit /etc/sysctl.conf

Add

# Help OOM killer not to kill

vm.overcommit_memory=2

vm.overcommit_ratio=80

20 June 2013 Update

I have found that we still get OOM’s on our VM’s with Centos 6.3, 4GB swap, 2GB ram.  Informix set to use 1GB.  We will continue to monitor, and looking into diabling OOM for Informix oninit.  See script below.  “set_oom.sh”

—————————————————————————————————–

#——————————————————————————
# Name  : set_oom.sh
# Desc  : Set OOM for Informix oninit to disable.
# Auth  : H Visagie – (C) 2013 VisagieH.com
# Date  : 20 Jun 2013
# Usage : No parameters are passed
# Notes : This script will disable OOM killer for informix oninit processes.
#             : Run once after Informix startup.
# Ver      : 1.0
#——————————————————————————

echo “PID    OOM_score Before”

ps -ef | grep oninit | grep -v grep | while read NAME PID dummy
do
echo -n “$PID  ”
cat /proc/$PID/oom_score

if [ -r /proc/$PID/oom_adj ]; then
echo “-17” > /proc/$PID/oom_adj
fi
if [ -r /proc/$PID/oom_score_adj ]; then
echo ‘-1000’ > /proc/$PID/oom_score_adj
fi
done

echo “”
echo “PID    OOM_score After”
ps -ef | grep oninit | grep -v grep | while read NAME PID dummy
do
echo -n “$PID  ”

cat /proc/$PID/oom_score
done

 

 

Comments are closed.