PJSIP PJ_ENOMEM Error

Hi Folks,

Every week or so I have to restart my FreePBX server because I receive the error messages below. Is there a setting for PJSIP that needs to be increased so I don’t receive these messages?

My system is has approx 60 extensions, 40 of them Digium D70 phones and 20 of them Mitel 6869i running TLS/SRTP. My FreePBX version is 13.0.192.9. Asterisk is version 13.15.0. The modules are on the stable track, not edge. Physical server, not virtualized with two Xeon E5-2650 V4 processors and 16GB of ram.

Thanks for your help.

RAM Usage:
[[email protected] ~]# free
total used free shared buffers cached
Mem: 16206164 3102828 13103336 448 257676 1631600
-/+ buffers/cache: 1213552 14992612
Swap: 8175612 0 8175612

Error messages:
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928141’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9922
141’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9925141’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
142’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928142’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9928
143’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9922143’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
143’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928144’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
144’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928145’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
145’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9925147’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9928
147’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9925148’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 β€˜Not enough memory (PJ_ENOMEM)’ sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9922
148’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 β€˜Not enough memory (PJ_ENOMEM)’ sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928148’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 β€˜Not enough memory (PJ_ENOMEM)’ sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] ERROR[6313] res_pjsip.c: Error 70007 β€˜Not enough memory (PJ_ENOMEM)’ sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9928
150’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9922150’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
150’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928153’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
153’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928154’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9922
154’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9925154’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9928
161’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9925161’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension '9925
162’ priority -1 to restapps-device-hints
[2017-06-11 11:24:42] VERBOSE[6639] pbx.c: Added extension β€˜9928162’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension '9928
170’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension β€˜9925170’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension '9928
172’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension β€˜9922172’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension '9925
172’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension β€˜9928199’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension '9922
199’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension β€˜9925199’ priority -1 to restapps-device-hints
[2017-06-11 11:24:43] VERBOSE[6639] pbx.c: Added extension '9928
202’ priority -1 to restapps-device-hints

Please take out the verbose messages.

Hi Andrew,

Are you saying that it is something that can be ignored because the verbose messages are just being β€œoverly wordy” and the system should function properly?

Well it looks like your system is running out of memory but it was hard to see without your message being wrap as code and with all of the verbose messages.

Hi Andrew,

Here are the messages without the extra verbosity.

[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 'Not enough memory (PJ_ENOMEM)' sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 'Not enough memory (PJ_ENOMEM)' sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] ERROR[6312] res_pjsip.c: Error 70007 'Not enough memory (PJ_ENOMEM)' sending NOTIFY request to endpoint 148
[2017-06-11 11:24:42] ERROR[6313] res_pjsip.c: Error 70007 'Not enough memory (PJ_ENOMEM)' sending NOTIFY request to endpoint 148

In case it is of any use, when PJSIP throws those errors, the phones using PJSIP fail to register.

Additional info:

The system is approx 1 year old and processes approx 100 calls a day.

The error is simply Not enough memory. PJSIP has run out of memory and won’t do anything.

How much RAM do you have on the system

That’s almost nothing for a machine of that size. There may be a bug in the Asterisk version you’re running - How long has this been happening?

There is 16GB of ram. Below is its usage.

[[email protected] ~]# free
total used free shared buffers cached
Mem: 16206164 3102828 13103336 448 257676 1631600
-/+ buffers/cache: 1213552 14992612
Swap: 8175612 0 8175612

Hi Rob,

This has been going on for months. I usually don’t let it get to the point of failure as I know I have about 7 days of use before the errors start, so the system gets restarted before that. Time constraints have delayed me from giving this matter the attention it needs.

One more item to note, this system was an install from the FreePBX distro, it was not installed in some other manner. There is no additional software added to the machine. All modules are at the latest stable track.

The β€˜free’ output you posted earlier is showing plenty of free memory. How long is it going to be until you think it starts playing up again? We’ll need to see the output of β€˜free’, as well as β€˜ps -auxw’ when it’s erroring, unfortunately.

About July 4th if left unattended.

1 Like

Well, this is going to be an Asterisk issue (most likely), but if you could wait until it IS erroring, and then run these commands, that’ll help us diagnose what the problem is:

ps -auxww | pastebin
free -h | pastebin
tail -500 /var/log/asterisk/full | pastebin
asterisk -rx 'core show channels' | pastebin

That will give you 4 links that you can paste here (or, send to either @tm1000 or I as a private message) and that will be amazing. Sorry we can’t do much more now 8-(

Many many thanks Rob. Will do.

1 Like