Asterisk is slow

From Kolmisoft Wiki
Revision as of 07:21, 3 March 2014 by Nerijuss (talk | contribs)
Jump to navigationJump to search

Asterisk is slow on reload if either DNS lookup is slow or MySQL connection responds slowly.

MySQL connection can be check by manually connected to it:

mysql -h 123.123.123.123 -u mor -pmor

if you see that it takes few seconds, that will be the issue.

Connect to database server and check MySQL logs. If you see something like:

140303  2:07:14 [Warning] IP address '10.0.0.5' could not be resolved: Temporary failure in name resolution

it means that problems are caused by DNS lookup. Fix your network configuration or simply add

skip-name-resolve

in my.cnf under [mysqld] and restart MySQL. Do not forget to re-create MySQL users by using IPs instead of hostnames. For example "mor@localhost" should be recreated as "mor@127.0.0.1" and certain permissions should be granted to keep it working.