We are having trouble with some SQL connect errors, along with DEAD calls showing on the realtime report while agents are still in a call.
We have several asterisk servers and 2 web servers.
My thought is that our network switch is not able to handle all the connections to the database from all the servers.
The reason I think this is I have been getting the following errors from the dialing servers
DBI connect('asterisk:IP.IP.IP.IP:3306','cron',...) failed: Can't connect to MySQL server on 'IP.IP.IP.IP' (110) at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 706.
Couldn't connect to database: Can't connect to MySQL server on 'IP.IP.IP.IP' (110) at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 706.
But this is intermittent.
Also this one:
DBI connect('asterisk:IP.IP.IP.IP:3306','cron',...) failed: Can't connect to MySQL server on 'IP.IP.IP.IP' (110) at /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl line 142.
Couldn't connect to database: Can't connect to MySQL server on 'IP.IP.IP.IP' (110) at /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl line 142.
Also on mtop I sometimes notice querys waititng for 4 or more seconds like this not sure its related, but My thought is perhaps its not comunicating with the webserver/asterisk server thats sending this because the network switch is too loaded.:
Command: Query State: Waiting for table level lock
SELECT list_id, gmt_offset_now, called_since_last_reset, phone_code,
phone_number, address3, alt_phone, called_count, security_phrase
FROM vicidial_list
WHERE lead_id='940055'
All Servers were installed with ViciBox5.x86_64-5.0.3.iso and use SVN 2016
The DB server is 16 core 16gb RAM with raid 10 SSD.
My only other thought is that my.conf for maria DB or server-tuning.conf for apache is not configured correctly for this much load.
-----my.conf-----
- Code: Select all
[mysqld]
port = 3306
socket = /var/run/mysql/mysql.sock
datadir = /var/lib/mysql
skip-external-locking
key_buffer_size = 1400M
max_allowed_packet = 2M
table_open_cache = 8192
sort_buffer_size = 4M
net_buffer_length = 8K
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M
thread_cache_size = 50
query_cache_size = 0
thread_concurrency=8
skip-name-resolve
connect_timeout=60
long_query_time=3
log_slow_queries
max_connections=868
open_files_limit=24576
max_heap_table_size=32M
expire_logs_days=3
default-storage-engine=MyISAM
table_definition_cache=8192
table_cache=8192
myisam_recover
myisam_repair_threads=1
# This will disable networking
#skip-networking
----server-tuning.conf----
- Code: Select all
<IfModule prefork.c>
# number of server processes to start
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
StartServers 5
# minimum number of server processes which are kept spare
# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
MinSpareServers 5
# maximum number of server processes which are kept spare
# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
MaxSpareServers 10
# highest possible MaxClients setting for the lifetime of the Apache process.
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
ServerLimit 250
# maximum number of server processes allowed to start
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
MaxClients 250
# maximum number of requests a server process serves
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
MaxRequestsPerChild 10000
</IfModule>
# worker MPM
<IfModule worker.c>
# initial number of server processes to start
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
StartServers 3
# minimum number of worker threads which are kept spare
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#minsparethreads
MinSpareThreads 25
# maximum number of worker threads which are kept spare
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxsparethreads
MaxSpareThreads 75
# upper limit on the configurable number of threads per child process
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
ThreadLimit 64
# maximum number of simultaneous client connections
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
MaxClients 250
# number of worker threads created by each child process
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
ThreadsPerChild 25
# maximum number of requests a server process serves
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
MaxRequestsPerChild 10000
</IfModule>
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
I hope I provided all the information needed
Any Ideas would be greatly appreciative.
I really Appreciate being part of such a great community.