Hi,

having some rare issues writing acc-data to a remote MySQL server. The 
connection is made using the MySQL SSL options. Most, 99,9%, of the writes work 
well.

The error is:
```
Nov 20 13:48:55 /usr/sbin/kamailio[28976]: WARNING: db_mysql [km_dbase.c:84]: 
db_mysql_submit_query(): driver error on ping: SSL connection error: socket 
layer receive error
Nov 20 13:48:55 /usr/sbin/kamailio[28976]: ERROR: db_mysql [km_dbase.c:121]: 
db_mysql_submit_query(): driver error on query: SSL connection error: socket 
layer receive error
Nov 20 13:48:55 /usr/sbin/kamailio[28976]: ERROR: <core> [db_query.c:235]: 
db_do_insert_cmd(): error while submitting query
```

Apart from the connection details (using [mysql-ssl-conf] for the SSL config 
block) I have this config:
```
modparam("db_mysql", "ping_interval", 30);
modparam("db_mysql", "timeout_interval", 8);
```

The documentation suggests that "ping_interval" is the "Time interval in 
seconds to send ping messages to MySQL server in order to keep the connection 
open." However, looking at the code this seems a bit misleading because it 
looks like the ping is only done on an actual query (db_mysql_submit_query), 
i.e. not with a regular interval/on a timer as suggested by the documentation?

Also the "auto_reconnect" parameter is stated as default 1 (on), but in the 
code this is just used as a "retry" of the query itself and MYSQL_OPT_RECONNECT 
is never set on the connection 
(https://dev.mysql.com/doc/refman/5.5/en/auto-reconnect.html)? Maybe this is 
not necessary and it's enough to just re-try the query?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/406
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to