[SR-Users] Lost connection to MySQL server during query

Fred Posner fred at palner.com
Thu Mar 28 19:01:12 CET 2019


The standard kamailio_cdrs does no response if nothing done, so this is 
probably when you have no calls to "process."

Adding something like...

select 'done' as result;

to the end of the proc should stop it.

Fred Posner
fred at qxork.com
https://qxork.com
Direct/SMS: +1 (224) 334-3733
Direct/SMS: +1 (336) 439-3733

Need Fred? Call Fred. 336-HEY-FRED
Matrix: @fred:matrix.lod.com

On 3/28/19 1:42 PM, JR Richardson wrote:
> Hey Folks,
> 
> Getting some annoying logs, pretty certain these are false positives.
> I'm running kamailio 4.4.7 using localhost mysql 5.5.60 on debian
> 7.11. Pretty simple setup, have acc and collecting cdrs. Relevant
> kamailio.cfg:
> 
> loadmodule "acc.so"
> loadmodule "rtimer.so"
> loadmodule "sqlops.so"
> 
> # -----  acc params -----
> modparam("acc", "db_url", DBURLRW)
> modparam("acc", "db_flag", 1)
> modparam("acc", "db_missed_flag", 2)
> modparam("acc", "db_extra",
>          "src_user=$fU;src_domain=$fd;src_ip=$si;"
>          "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"
>          "accountcode=$avp(s:acctcode)")
> modparam("rtimer", "timer", "name=cdr;interval=300;mode=1;")
> modparam("rtimer", "exec", "timer=cdr;route=CDRS")
> modparam("sqlops", "sqlcon", "cb=>mysql://rwuser:rwpass@localhost/kamailio")
> 
> route[CDRS] {
>          sql_query("cb","call kamailio_cdrs()","rb");
> }
> 
> Logs:
> ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver
> error on query: Lost connection to MySQL server during query (2013)
> ERROR: <core> [db_query.c:181]: db_do_raw_query(): error while submitting query
> ERROR: sqlops [sql_api.c:265]: sql_do_query(): cannot do the query
> [call kamailio_cdrs()]
> 
> CDRs are working fine, no issues with the results, just the log
> messages. Errors occur every 5 minutes so this is related to the
> rtimer cycle, mode=1 is set for new connection so there really
> wouldn't be a lost connection, the old connection should have been
> relieved on last cycle.
> 
> I've seen some other post talking about this issue but could not find
> any resolution or work around. Any help is appreciated.
> 
> Thanks.
> 
> JR
> 



More information about the sr-users mailing list