[Pdns-dev]
[PATCH][RFC] gmysqlbackend: reliability enhancement, reconnect if
required
Peter Fern
pdns at obfusc8.org
Wed Aug 20 19:09:43 CEST 2008
Hi Bert/list,
I'm curious as to why the attached patch (or something similar) has not
been implemented, since a mysql_ping() represents minimal overhead, and
results in results being returned in a reliable manner, rather than
relying on potentially infinite idle timeouts on the mysql connection.
This issue has been raised a number of times, but I can't see a detailed
response as to why this shouldn't be fixed.
With a shared MySQL server it may be undesirable to have unlimited
wait_timeouts server-wide, however this represents a problem with
infrequently queried pdns instances. In our case, we have dedicated
gmysqlbackend master pdns instances that are never queried directly for
records, and my be idle for days if there are no zone updates. When a
notify is triggered, if the connection has gone away, the query simply
fails, the notify is unsuccessful and the slave never updates, however
the notified_serial may be updated. This is obviously a sub-optimal
scenario.
The attached simple patch provides for reliable retrieval of results in
a heterogeneous environment. Please provide any feedback or comments
you may have.
Regards,
Peter Fern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mysql-reconnect.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20080820/4b9241fc/mysql-reconnect.bin
More information about the Pdns-dev
mailing list