Call connections are slow

From Kolmisoft Wiki
Jump to navigationJump to search

Please check call logs in /var/log/asterisk/messages or in Asterisk CLI.

If you can see time gaps (more than 5 seconds) in Notice lines of same call, it indicates Asterisk and Database connection problems.

Example:

2012-02-13 16:34:10] NOTICE[21206]: app_mor.c:156 mor_exec: Core version: 11.0.23, Server ID: 1, Dial out settings: , active calls enabled: 1, active calls count: 7, weekday: WD (2012-02-13), use lcr partials: 1,  check_banned_clis: 1, use_speed_dials: 1, play_hgc_audio: 0, use_flat_rates: 1, server ip: 127.0.0.1                                                             
[2012-02-13 16:34:10] NOTICE[21206]: app_mor_various.c:507 mor_get_variables: Tell balance: 0, tell time: 0, tell time mod.: 1.000000, tell r.time when left: 0 s, tell r.time every: 60 s, card_id: 0, callback: 0, call_leg1: 0                         
[2012-02-13 16:34:15] NOTICE[21206]: app_mor_authentication.c:1313 mor_read_data_from_channel: Date: 2012-02-13, time: 16:34:10                                                                                                                           
[2012-02-13 16:34:15] NOTICE[21206]: app_mor_various.c:351 mor_check_weekday: Weekday: WD for date: 2012-02-13

Here you can see 5 second different between 2nd and 3th line.


Increasing amount of MySQL connections can help to resolve the issue.

It can be done by adding following option to /etc/my.cnf under [mysqld] section:

[mysqld]
max_connections = 300

and restarting MySQL.