We use mysql to update status of a call using the built in mysql functions. We currently have been trying to switch to a different SIP provider for outgoing calls but once we hit a higher call volumes things start to go bad. Mysql deadlocks records and asterisk spits out a bunch of errors. Can’t figure out what side is the problem exactly except to think its the provider since it doesnt seem to happen on the original provider.
From what we can tell, the main source of sql trouble is around this deadlocking " Query SELECT LAST_INSERT_ID() AS last FROM table" which is autoincrement feature. It causes these errors:
WARNING app_mysql.c: mysql_real_connect(mysql,server,user,pass,DB,…) failed(2003): Can’t connect to MySQL server on ‘server’ (111)
WARNING app_mysql.c: aMYSQL_query: mysql_query failed. Error: MySQL server has gone away
Getting tones of these errors once its starts going bad but mostly the last 4 errors.
ERROR res_rtp_asterisk.c: RTCP SR transmission error to 220.127.116.11:6257, rtcp halted Operation not permitted
ERROR res_rtp_asterisk.c: RTCP SR transmission error to 18.104.22.168:6699, rtcp halted Operation not permitted
ERROR acl.c: Cannot create socket
ERROR chan_sip.c: Got SDP but have no RTP session allocated.
WARNING res_rtp_asterisk.c: Unable to allocate RTP socket: Too many open files
WARNING chan_sip.c: Autodestruct on dialog ‘39e967dd6619b35941c7ce1477da4794@SERVERIP:5060’ with owner in place (Method: BYE)
Are the calls failing at a high rate causing mysql to execute all the failed queries at once locking up mysql? There are a couple queries that happen on the h extension in the context.
Any help on what exactly the RTP issues are having problems with?