Is mysql server writing any error messages?
Do you use ssl connections for mysql?
Cheers,
Daniel
On 19/12/15 06:46, Juha Heinanen wrote:
for some reason once in a while kamailio processes
fail to execute mysql
queries while at the same time an mysql test script that is run once per
second from cron works fine.
kamailio executes mysql queries during normal sip message processing and
also when it processes an OPTIONS ping test request:
sql_query("sip_proxy", "SELECT table_version FROM version WHERE
table_name='domain'", "result");
if ($rc == 1) {
sql_result_free("result");
options_reply();
} else {
xlog("L_ERR", "$rm <$ru> failed sql test\n");
sql_result_free("result");
send_reply("500", "Server Internal Error");
};
here is an example:
...
Dec 15 00:51:08 proxy1 php: MySQL server test succeeded
Dec 15 00:51:09 proxy1 php: MySQL server test succeeded
Dec 15 00:51:10 proxy1 /usr/bin/sip-proxy[29894]: ERROR: db_mysql [km_dbase.c:123]:
db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during
query
Dec 15 00:51:10 proxy1 /usr/bin/sip-proxy[29894]: ERROR: db_mysql [km_dbase.c:145]:
db_mysql_async_exec_task(): failed to execute query on async worker
Dec 15 00:51:10 proxy1 php: MySQL server test succeeded
Dec 15 00:51:11 proxy1 php: MySQL server test succeeded
Dec 15 00:51:13 proxy1 php: MySQL server test succeeded
Dec 15 00:51:13 proxy1 /usr/bin/sip-proxy[29891]: ERROR: db_mysql [km_dbase.c:123]:
db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during
query
Dec 15 00:51:13 proxy1 /usr/bin/sip-proxy[29891]: ERROR: <core> [db_query.c:291]:
db_do_delete(): error while submitting query
Dec 15 00:51:13 proxy1 /usr/bin/sip-proxy[29883]: ERROR: OPTIONS <sip:xxx:5060>
failed sql test
Dec 15 00:51:14 proxy1 php: MySQL server test succeeded
Dec 15 00:51:14 proxy1 /usr/bin/sip-proxy[29886]: ERROR: OPTIONS <sip:xxx:5060>
failed sql test
Dec 15 00:51:15 proxy1 php: MySQL server test succeeded
Dec 15 00:51:15 proxy1 /usr/bin/sip-proxy[29885]: ERROR: OPTIONS <sip:xxx:5060>
failed sql test
Dec 15 00:51:16 proxy1 php: MySQL server test succeeded
Dec 15 00:51:17 proxy1 php: MySQL server test succeeded
Dec 15 00:51:18 proxy1 php: MySQL server test succeeded
...
all db_mysql module params are at their default values.
any idea why kamailio at connection loss does not automatically create
new connections?
is there a means to somehow debug this further?
-- juha
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio -
http://www.asipto.com
http://miconda.eu