On Dienstag, 22. September 2009, Jason Penton wrote:
> Hi Andrei,
>
> From what I have seen in the code this is pretty useless (no offence).
>
> The ping in this particular instance is only executed JUST before a real
> query is to be issued. i.e. if a query is not used in Kamailio for a couple
> of hours - the ping is actually never sent...........
Hi Jason,
you're right that its not executed with a timer or similar, but the mysql_ping() should reconnect to the database if the auto reconnect is activated, according the documentation:
http://dev.mysql.com/doc/refman/5.0/en/mysql-ping.html
> what I have noticed is that when the connection is torn down by the
> firewall, the ping actually hangs (reconnect fails), etc
>
> So, we NEED a proper ping (keepalive) functionality :D
This could be implemented with help of the internal timers, just execute periodically the mysql_ping command, for example.
Henning