I looked at the docs for lib mysql client, haven't spotted any other hint for
attempting to reconnect.
Is the next log message added by you?
```
Dec 8 17:06:19 /usr/sbin/kamailio[31957]: WARNING: db_mysql [km_dbase.c:92]:
db_mysql_submit_query(): mysql thread id changed due to reconnect on mysql_ping
```
It doesn't match in the source code. If you did some changes to db_mysql module, post
here the diff.
Also, what is the module that triggers the query in this case? It is done in timer
process, so it could be acc, usrloc, sqlops... there should be eventuall some other error
messages around those printed by db_mysql.
A solution would be to try to do queries more often on timer module. That can be achieved
using rtimer, defining one that uses the main timer (mode=0) and execute a route block
where you do a simple query.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/406#issuecomment-180250223