Issue:
Shared memory utilization in OpenSIPS increases linearly with SIP transactions. If OpenSIPS runs out of shared memory it will crash. The “child process exited by a signal 11” log message in OpenSIPS log file.
Log message:
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18166]: Requesting OSP authorization and routing
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18166]: INFO:osp:ospRequestRouting: request auth and routing for: service_type '0' source '[206.80.70.86]:5060' source_dev '[173.192.69.190]' source_networkid '' calling '9492565611' called '19852645453' preferred '' nprn '' npcic '' npdi '0' rpid '' pai '' div_user '' div_host '' pci '' call_id '38c7d47654021ca455724c1067858bca@cf-dialer.com' dest_count '12'
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18015]: INFO:core:handle_sigs: child process 18139 exited by a signal 11
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18015]: INFO:core:handle_sigs: core was not generated
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18015]: INFO:core:handle_sigs: terminating due to SIGCHLD
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18250]: Try the next route
Apr 2 21:14:02 dialer-osp2 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips[18250]: INFO:core:sig_usr: signal 15 received
Troubleshoot:
The “child process exited by a signal 11” message is an example of what OpenSIPS might log when it runs out of memory and crashes.
Solution:
The solution is to edit the restart_OpenSIPS.sh script so more shared memory is allocated to OpenSIPS. Here are the instructions:
Navigate to the utils folder.
[ospadmin@dialer-osp1 ~]$ cd $OpenSIPS_HOME/utils
[ospadmin@dialer-osp1 utils]$ pwd
/home/ospadmin/OSP/OSPreyPackage/opensips/utils
Edit the last line of the restart_OpenSIPS.sh script. In this example, 8,192 MB of RAM have been assigned to OpenSIPS.
#!/bin/bash
# restart_OpenSIPS.sh
#
# This script checks if OpenSIPS is running. If the application is not running,
# it executes restart_OpenSIPS.sh from OpenSIPS_HOME/utils.
#
if pgrep opensips >/dev/null 2>&1
then
# Do nothing, the proxy is running
exit 1
fi
echo "!!!OpenSIPS is not running!!!"
echo "The application will be restarted"
$OpenSIPS_HOME/sbin/opensips -m 8192
Restart the OpenSIPS application. OpenSIPS will restart automatically within one minute if the opensips process is killed.
[ospadmin@dialer-osp1 utils]$ pkill -9 opensips