Re: Frustrating mysql problem.

Todd Lyons <[email protected]> Mon, 20 Jul 2009 21:17:25 -0700
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
On Mon, Jul 20, 2009 at 12:16 PM, Erol<[email protected]> wrote:
> Im having the oddest and most frustrating problem with mysql.
>
> Currently when I fire up bind-dlz and mysql all works as it
> should. When I query for zones in the mysql database I get the
> results I should. A dig against the nameserver returns the proper
> results.
>
> However after an hour or two I start getting the error below when
> I try and run the same query.
>
> mysql driver unable to return result set for findzone query
>
> A dig will return a REFUSED.
>
> The database is not on local disk but it is on the same (internal) network. When this
> happens I am able to use the mysql client , connect to the
> database and run the sql queries.
>
> I ran a tcpdump on the nameserver. When the error occurs it is not
> attempting to connect to the DB server.
>
> Ive searched high and low to no avail. This has grown beyond
> frustrating now.
>
> Has anyone experienced anything like this .... anyone?

Yes, this was my issue:

CentOS52[root@ivdns51 ~]# grep OPTIONS /etc/sysconfig/named
# OPTIONS="whatever"     --  These additional options will be passed to named
OPTIONS="-n 1"

This is from http://bind-dlz.sourceforge.net/mysql_driver.html:
The MySQL driver has one additional limitation. MySQL uses thread
local storage in its C api. Thus MySQL requires that each thread of an
application execute a MySQL "thread initialization" to setup the
thread local storage. This is impossible to do safely while staying
within the DLZ driver API. This is a limitation caused by MySQL, and
not the DLZ API. Because of this BIND MUST only run with a single
thread when using the MySQL driver.
-- 
Regards...      Todd

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge