Apply config going forever

Platform: FreePBX 14 with asterisk 13/15 distro.
Hardware: Intel Dual-Core, 2T hard drive, 4GB RAM
Fresh Install, No extensions and trunks yet.

Symptoms: “apply config” hang after one or two successful one. I tried asterisk 15 and 13, both are same. Every time I have to “fwconsole restart” and it can’t kill asterisk. Then I kill the asterisk and retrieve_conf manually, then do “fwconsole restart” again, it will back to normal. After one or two “apply config”, same thing happens aggain. Sometimes retrieve_conf CPU usage 99%. I uninstalled all unused modules, such as digum module, and followed some instructions here, but all didn’t work, very frustrated. I have IncrediblePBX setup on my RaspberryPi3, it runs smoothly without any problem, I was just thinking that I’m using SD card instead of SSD/hard drive on the PI, so I would like to switch it to a desk-top. I also did the update. It’s been so many days. Any help would be appreciated!!

Thanks!

Sounds like a hardware problem. Try a different machine.

Thanks for your reply, but I don’t believe it is not the case because you can’t blame on the hardware just because one process cannot be killed.

Absolutely it is hardware. The only thing that can stop a process from being killed is being locked in the kernel. 9 times out of 10 it is blocked on a disk read/write failure, the other time it is bad RAM or CPU.

I mean “fwconsole restart” can’t kill asterisk, but if I send SIGKILL to it, that is said, using command “kill -9 PID” , then asterisk can be killed. One cannot blame on hardware easily. I did the dock check before I installed the distro, and found no bad cylinder/sector, etc. If ram has the problem, POST will report it. I REALLY can’t believe it is hardware problem. Thanks.

OK, so what you’re saying is asterisk has HUNG. That’s normally because of DNS issues.

There are many ways to ‘kill’ a process, SIGKILL should be used carefully and generally as a last resort as the reason for the “hang” would be hidden :wink:

There are many things that can stop a lesser signal terminating a process, barring bad memory perhaps the number 1 culprit would be a full disk.

I would suggest following

and slowly work your way up from the tamest to the most aggressive to declog your system.

I have 4 lines in a resolv.conf, 2 from ISP, 2 are google’s server: 8.8.8.8, 8.8.4.4, I don’t think dns is not an issue.

thank you, Benjamin, thanks for the article and I learned. I feel shame on myself that as a former Linux developer, I use kill -9 all the time. At this moment, what should I do to debug the system. I’m a C guy not good at script languages.

It works just fine in C too

https://www.gnu.org/software/libc/manual/html_node/Signal-Handling.html, feel free to do it that way :wink:

examples

https://www.thegeekstuff.com/2012/03/catch-signals-sample-c-code

(Asterisk is all pure c https://github.com/asterisk/asterisk)

Thanks dicko, I looked asterisk log file full, when I click the apply config button, I got tons of information and don’t know what to look at. At the same time, retrive_conf is causing high cpu usage. Can u please recommend where I should start from?

I would start with the “Wiki” , linked to at the top of this page. Plenty of articles on how-to’s and debugging.

Particularly

https://wiki.freepbx.org/display/SUP/Providing+Great+Debug

which shows you how to get a core dump and then use your c skills to see what’s going wrong for you

For a deeper view

http://asterisk-service.com/downloads/Asterisk-%20The%20Definitive%20Guide,%204th%20Edition.pdf

Let me remind you what I said:

How have you checked that all of those DNS servers are working reliably? Are you sure the network is not dropping out, which is causing DNS requests to time out?

That is normal. It is regenerating the entire config.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.