Difference between revisions of "Asterisk is slow"

From Kolmisoft Wiki
Jump to navigationJump to search
 
Line 16: Line 16:


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.
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.
This issue can happen if DB is slow for some other reasons like hardware failure or server/OS configuration problems. There was one case were commands (like "free") were responding very slowly which indicated server problems. Solution was server replacement.

Latest revision as of 09:35, 26 July 2017

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.

This issue can happen if DB is slow for some other reasons like hardware failure or server/OS configuration problems. There was one case were commands (like "free") were responding very slowly which indicated server problems. Solution was server replacement.