Re: BIND with DLZ doesn't reconnect to the MySQL 5.x server after?disconnect
In message <20090925184532.cf9cc...@raisa.eu.org>, Emil Smolenski writes: > Mark Andrews wrote: > > > Reconnect is already being set. > > Hello. Indeed, I found following message in release notes of BIND > 9.6.1-P1 ( http://oldwww.isc.org/sw/bind/view/?release=9.6.1-P1 ): Which you should have seen came *after* 9.6.1 was released. The CHANGES file is in reverse chronological order. 2581. [contrib] dlz/mysql set MYSQL_OPT_RECONNECT option on connection. Requires MySQL 5.0.19 or later. [RT #19084] 2580. [bug] UpdateRej statistics counter could be incremented twice for one rejection. [RT #19476] --- 9.6.1 released --- > dlz/mysql set MYSQL_OPT_RECONNECT option on connection. Requires MySQL > 5.0.19 or later. [RT #19084] > > But there is no output from the second command: > > $ tar xf bind-9.6.1-P1.tar.gz > $ grep -r MYSQL_OPT_RECONNECT bind-9.6.1-P1 > $ > > I've tested it. BIND still doesn't reconnect. After applying patch > mentioned earlier, BIND starts to work properly. > > I believe this patch should be commited (as is committed in 9.7.0a3): > > $ diff bind-9.7.0a3/contrib/dlz/drivers/dlz_mysql_driver.c \ >bind-9.6.1-P1/contrib/dlz/drivers/dlz_mysql_driver.c > 795,797d794 > < #ifdef MYSQL_OPT_RECONNECT > < my_bool auto_reconnect = 1; > < #endif > 929,939d925 > < #ifdef MYSQL_OPT_RECONNECT > < /* enable automatic reconnection. */ > < if (mysql_options((MYSQL *) dbi->dbconn, MYSQL_OPT_RECONNECT, > < &auto_reconnect) != 0) { < isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, > < DNS_LOGMODULE_DLZ, ISC_LOG_WARNING, > < "mysql driver failed to set " > < "MYSQL_OPT_RECONNECT option, continuing"); > < } > < #endif > > BTW, why there are only #ifdefs without #define in 9.7.0a3? Is user > forced to set this option himself to make it work? No. MYSQL_OPT_RECONNECT is only in some versions of mysql. If you have a version which supports MYSQL_OPT_RECONNECT then MYSQL_OPT_RECONNECT will be defined. Mark > -- > am -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Migrating DNS servers, need advice on hardware
Other means: The BIND manual tells how to turn on bind's query log, which is normally turned off for performance/resource reasons. On a very lightly loaded DNS server, it can be left on, and on a medium-loaded server, it may be practical to turn it on for a short while to collect some usage data. On a Solaris system, snoop can help (as can tcpdump on other *nix systems), e.g. to get a frame of reference regarding your load, inspect 1000 packets to port 53, measuring how many seconds it takes to collect them. ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users Thanks for the response John! I'm assuming that a modern multi core system in a SOHO or small business environment can have the query log turned on continuously as should be more then powerful enough from what many other people have said. Of course full enterprise scale is another matter!! Will try snoop soon as I have already managed to get Bind working using OpenSolaris on Sun's Virtual Box in a small-zone configuration. Of course just for testing purposes is running on a laptop and only has root name servers and very limited records meaning round 5 in forwards and reverse zone. But handles the load perfectly as I can actually take the laptop off the main primary and secondary DNS in the host OS and just use the DNS server in the zone from the guest OS in Vbox. Now from this little escapade of mine I have learned two things: the first being the power of modern hardware and virtualization and the second being that one doesn't need to go OTT for a DNS server in a small to moderate sized network - only a virtualized system or Solaris zone will do the trick or chroot combined with many other services as most rack infrastructure today can handle upto 24GB RAM+. This has been excellent guys - many thanks to all constructive comments and help ;-) Regards, Kaya ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Migrating DNS servers, need advice on hardware
How can observer the query count? Is there a command or table or something or is it just how many hits the systems gets on port 53 identified from some form of logging software? BIND logs hit statistics periodically to syslog, and you can use "rndc stats" to append statistics immediately to a file. See the BIND manual for details. Other means: The BIND manual tells how to turn on bind's query log, which is normally turned off for performance/resource reasons. On a very lightly loaded DNS server, it can be left on, and on a medium-loaded server, it may be practical to turn it on for a short while to collect some usage data. On a Solaris system, snoop can help (as can tcpdump on other *nix systems), e.g. to get a frame of reference regarding your load, inspect 1000 packets to port 53, measuring how many seconds it takes to collect them. ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users