FreePBX hangs, update issues (YUM, packages or FreePBX modules), too many open files
UPDATE: Sorry, forgot to mention I'm talking about Trixbox CE 2.4.2
Hi,
Adding a new extension in FreePBX is hanging, httpd goes up to over 90% CPU time and you get stuff like this in /var/log/httpd/error_log:
PHP Warning: fopen(/etc/asterisk/vm_general.inc) [function.fopen]: failed to open stream: Too many open files in /var/www/html/admin/functions.inc.php on line 1229
and also, trying to add an extension you get something like "Error: Trying to write null voicemail file! I refuse to continue!"
(see http://www.trixbox.org/forums/trixbox-forums/help/problems-creati... and http://www.trixbox.org/forums/trixbox-forums/help/error-trying-wr...)
Apparently this is something sitting around in the Trixbox forums (see http://www.trixbox.org/forums/trixbox-forums/help/there-problem-l...
http://www.trixbox.org/forums/trixbox-forums/help/web-server-time...
http://www.trixbox.org/forums/trixbox-forums/help/httpd-maxed-out...
http://www.trixbox.org/forums/trixbox-forums/help/yum-update-head... )
and the FreePBX forums as well:
http://freepbx.org/forum/freepbx/installation/issues-adding-exten...
Now, increasing the memory in /etc/php.ini to 128M (as suggested elsewhere) does no good; increasing the number of files in /etc/sysconfig/httpd.conf to 65000 leads to a httpd child core dump.
It appears to me these issues are connected. I'm down to the 6th (yes!) re-install and it's no fun.
For sure, if you do a yum update you will end up with the problem. So I stopped doing that.
The last time I killed the system, I installed a number of modules on FreePBX and downloaded the updated modules. On the packages, I installed webmin and munin; finally I upgraded the trixbox package (but not the php-pear, as it might be a PHP-related issue).
I may have gotten a bit confused, but it seemed that after upgrading the Trixbox packages last night the system was working fine and was able to add an extension. This morning it hangs when I add an extension.
Can we try to nail down this problem?
To pinpoint the step leading to the problem, I was considering making a VMWare image of the clean install; then I would clone the virtual machine (15 second process instead of 15 minutes to re-install), do my upgrades and figure out at which point things go wrong. Is this acceptable, I mean, could there be any issues with VMWare?
The problem stems from voicemail.conf, vm_general.inc and vm_email.inc
If all three files have the following:
[general]
#include vm_general.inc
#include vm_email.inc
[default]
It causes a loop making httpd spin out of control.
vm_email.inc should include instructions on how the voicemail to email body should look; by default:
; Change the email body, variables: VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_DATE
emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} second
s\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemail by phone.\nVisit http://AMPWEBADDRESS/recordings/index.php to check you
r voicemail with a web browser.\n
vm_general includes settings for pbxtra to use:
; 1st listed format gets emailed
format=wav49|wav
attach=yes
pbxskip=yes ; Don't put [PBX]: in the subject line
serveremail=vm@asterisk ; Who the e-mail notification should appear to come from
fromstring=Voicemail System ; Real name of email sender
maxmessage=180 ; max length of vm message
minmessage=3 ; Minimum length of a voicemail message in seconds
maxsilence=5 ; Wait for 5 silent seconds and end the voicemail
silencethreshold=128 ; What do we consider to be silence
skipms=3000 ; How many miliseconds to skip forward/back when rew/ff in message playback
review=yes ; Allow sender to review/rerecord their message before saving it
operator=yes ; Allow caller to press 0
nextaftercmd=yes ; Automagically play next message when current message is deleted or saved
Thank you,
Andy
trixbox Support
Just installed 2.4.2, then updated using the web page to upgrade all the packages showing that an update was available, and *wham*; busted system.
Not good. I tried to follow some of the other suggestions, such as reinstalling freepbx; ok, yum required that freepbx be removed along with trixbox, but then trixbox couldn't be reinstalled after installing freepbx, because (get this) it required freepbx! There are clearly some dependency issues busted with the packaging. So, I finally found the trixbox RPM in /var/cache/yum/... and reinstalled it by hand using "rpm -Uvh trixbox... .rpm". Still no joy.
Then I found this message. Good job for finding what got busted, but;
1) Why did it get busted, and (since this has been going on for 2 months), what can we do to fix it?
2) Now that it is busted, how do we fix it? The above comment is interesting, but not very action oriented...
Do I deduce that I need to go in and edit the affected files? If so, how? Remove the includes? From all files? Or just some? Perhaps just the ones that are trying to include themselves? Seems like a good guess, I'll try that...
(later)
Nope; all three files are identical... So, hmm. Lets go try to find what the original files should look like...
--
-pjk
Hi everyone
Don't know how that came about but it was in a clients box.. you saved me a reinstall right there. This must happen with one of the upgrades or patches as I had the issue occur down the line on a live system.
Once again: Thank you, thank you, thank you!
Another way method if you still cannot get it to work.
http://www.trixbox.org/forums/trixbox-forums/help/there-problem-l...


Member Since:
2006-11-11