Page 1 of 1

asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 6:13 am
by phil_discount
Hello,
sometimes asterisk crash without any logentry, everything else works fine (mysql/apache/..).
i want to know why.
i looked at the start parameter of asterisk "/usr/sbin/asterisk -vvvvgcT\015"
"g" => Dump core in case of a crash
Why does asterisk doesnt do that? i cannot find any asterisk dump file in /tmp/

Regards
Philip

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 6:53 am
by geoff3dmg
On most current linux systems core dumps are disallowed. You must run 'ulimit -c unlimited' before running asterisk.

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 7:08 am
by phil_discount
Ok i turned on * soft core unlimited in /etc/security/limits.conf
when i stop asterisk with "/usr/bin/killall -9 asterisk" i hoped to get a dump file /tmp/, but i dont get one.

Can somebody tell me why?

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 9:19 am
by geoff3dmg
killing asterisk with a SIGKILL signal is not a crash, therefore there is no core dump file.

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 9:25 am
by phil_discount
how can i simulate a crash to check if dumping works?

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 9:46 am
by geoff3dmg
'kill -SIGQUIT process_id'

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 10:10 am
by phil_discount
did it, no dump file in /tmp/
what can be the problem?

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 10:18 am
by geoff3dmg
Is /tmp the working directory of the asterisk process?

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 10:27 am
by phil_discount
the working directory is /var/run "astrundir => /var/run"
but there arent any files too

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 11:13 am
by williamconley
If asterisk terminates in an unusual fashion, the "asterisk screen" (screen -r asterisk) could have some output explaining the situation.

Also, this is usually (in our experience) the result of someone adding modules to asterisk or reconfiguring or upgrading asterisk. Not because the technician has done anything "wrong" necessarily, just because the present set of modules is well tested. Clean Vicibox installs almost never experience an asterisk crash. Unless there is a hardware problem (bad memory can crash anything, LOL).

If you are trying to crash asterisk, you could try turning on ALL the modules. Then try to use all the available functions/applications in asterisk (with one extension that calls them in sequence). We've found that to create a quite unstable system. LOL

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 11:17 am
by geoff3dmg
phil_discount wrote:the working directory is /var/run "astrundir => /var/run"
but there arent any files too


That's not a working directory. Use pwdx to find out where your working directory is (ironically it seems one of my telephony servers crashed Monday morning so I can demonstrate)..

Code: Select all
vicidial-1:/var/log/astguiclient # ps aux | grep asterisk
root      1734  0.0  0.0   3440  1028 ?        Ss   06:38   0:16 SCREEN -L -S asterisk
root      1741 20.4  0.9 106356 36888 pts/2    Sl+  06:38 118:21 /usr/sbin/asterisk -vvvvvvvvvvvvvvvvvvvvvgcT
root     19441  0.0  0.0   4012   764 pts/9    S+   16:17   0:00 grep --color=auto asterisk
vicidial-1:/var/log/astguiclient # pwdx 1741
1741: /var/log/astguiclient
vicidial-1:/var/log/astguiclient # ls -l core
-rw------- 1 root root 36917248 Mar  3 06:30 core

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 11:25 am
by phil_discount
cool, in /var/log/astguiclient is file named core (-:
Thanks a lot!! i try to debug next time

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 1:58 pm
by williamconley
Of course, you could just upgrade to the latest version and see if that helps. If it does, great. If not, the latest code has an "auto-restart' function for asterisk.

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 2:30 pm
by phil_discount
u mean latest version of asterisk 1.4.x?

Re: asterisk crash - core dump

PostPosted: Wed Mar 05, 2014 5:23 pm
by williamconley
latest version of vicidial is 2.8
latest version of viciBOX is 5.0.3

if you back up your DB and build a new server with the same SVN revision level of Vicidial and then put your database in it ... you'd have a fresh new server with the same data.

But: if you upgraded your existing vicidial server OR copied that database to a fresh server with the latest code and then upgraded your DB ... you'd have a fresh server with the latest Vicidial and still have all your data.

Re: asterisk crash - core dump

PostPosted: Wed Mar 19, 2014 2:54 am
by phil_discount
We've got no more crash since we splitted web and asterisk. no we've got 3x webserver with quadcore 2GB and normal SATA disk for about 200 agents.

Is it to much load for one web server?
ka-vici-web2:~ # netstat -n |grep ESTAB|grep '\:80 '|wc -l
280

Re: asterisk crash - core dump

PostPosted: Thu Mar 20, 2014 7:48 am
by williamconley
load is available via "uptime" or "top" or "htop". Shown in 1,5,10 minute "load average" numbers indicating the "number of processors in use". This means that if your load average is 3.5,4.0,4.5: the 1 minute load average is 3.5 processors, 5 minutes is 4 processors, and 10 minutes is 4.5 processors. This would be "ok" for an 8 processor system(slightly exceeding 50% of the available processors 10 minutes ago but back down under 4.0 now), but NOT good at all for a 4 processor system (this would be an overload condition then).

The goal should be to always stay under 50% of the available processors for the "averages".

Re: asterisk crash - core dump

PostPosted: Sat Mar 22, 2014 4:46 pm
by phil_discount
the load average is at all times under 0.5.
but how about the disk usage? load average doesnt display disk usage.
i checkted disk usage with iotop and some other tools.

everything seems to be OK.

i just want to know ur experience about the sizing of a webserver

Re: asterisk crash - core dump

PostPosted: Mon Mar 24, 2014 9:31 pm
by williamconley
you did ask "Is it to much load for one web server?", and the answer to that lies in checking the load average, as a rule.

Usually 200 agents would be viable with 3 web servers without a problem, but it does depend somewhat on usage and balancing.

For instance, how do you balance the load between the servers presently?

However, since you say you never go over 0.5, you should be fine. Assuming you actually checked that during heavy load.

Re: asterisk crash - core dump

PostPosted: Tue Mar 25, 2014 4:28 am
by geoff3dmg
You can see disk usage with 'iotop'.