Hylafax-IAXModem-Elastix-Avantfax Slow reloading fix

This is one that plagued me for a while. Unfortunately the fix was not found anywhere that I could locate.

We run eFax servers that utilize Elastix (Build on top of FreePBX), Hylafax, IAXModem, and Avantfax for a front end. This allows us to send SIP trunks to the box and utilize virtual IAX modems to send and receive fax.

The issue we were seeing was when a change was made to the eFax users delete/edit/add and it would initiate the reload of Hylafax and IAXModem it would take upwards of 30 minutes for all modems to come back up registered and ready to go. It originally took around a few minutes to reload the modems. Keep in mind we have around 380 virtual modems per box (there seems to be a hard limit somewhere in the software).

30 minutes is an unacceptable downtime for a eFax server so I dove into every config file I could find. Nothing seemed to provide any indication that things were incorrectly configured.

Finding nothing and watching all the logs I noticed that the Faxgetty process from Hylafax logs every step for each modem using syslog from de-initialization to initialization and finally the ready state. It had always done this. Because it would take time to write to the file if something is also reading the file we would see an issue like this, similar to when you have a script processing a file if you have it echo to the terminal it will take 2-3 times longer to execute (usually).

This thought that the log could be the issue led me to the fix for this issue.

Running Ubuntu or Elastix (Cent OS) vi /etc/syslog.conf

You will see a section that looks like this

# Log anything (except mail) of level info or higher.

# Don’t log private authentication messages!

*.info;mail.none;authpriv.none;cron.none             /var/log/messages

Change that to look like this (adding the bold section)

*.info;mail.none;authpriv.none;cron.none;debug.none             /var/log/messages

Save the file and restart syslog

/etc/init.d/syslog restart

Now my modems restart in 30-45 SECONDS down from 30 plus MINUTES! Seems that something is reading the file as the Faxgetty process was writing the file exponentially increasing the time it took to execute a simple reload command for a virtual modem.

Hopefully this helps someone with the same issues it was a rather annoying one 🙂

This entry was posted in Linux How-To and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *