[Pdns-users] gmysql backend and stored procedures

Max Lock Max.Lock at datanet.co.uk
Mon Aug 18 16:32:38 UTC 2008

Hi folks,

 I'm trying to integrate powerdns with our legacy mysql database here. I
have to create a union of three tables to get something that powerdns
will use. This takes about 0.4 seconds per query, and hammers the cpu.
due to needing to use the %s replacements in the config file in multiple
places in a more optimised version of my queries I've had to use stored
procedures that take 0.14 seconds to run (still not good enough, but
getting better). The problem is I can run the query just fine by hand,
but powerdns times out with the valid entry below, and gives and error
for anything that should go to the recursor? 

 I previously had very similar but slow queries in the config file that
worked fine?

has anyone come across anything similar to this before?


gmysql-any-query=call pdns_any_query('%s');

mysql cli:

mysql> call pdns_any_query('www.datanet.co.uk');
| content    | ttl         | prio | type | domain_id | name
| | 14400       |    0 | A    |       281 | www.datanet.co.uk
1 row in set (0.14 sec)

bash host lookup:

max at ns3:/etc/powerdns/pdns.d# host www.datanet.co.uk
;; connection timed out; no servers could be reached

syslog entry for non-local record:

Aug 18 15:51:04 ns3 pdns[12231]: Query: call
Aug 18 15:51:04 ns3 pdns[12231]: Backend error: Failed to execute
mysql_query, perhaps connection died? Err=1: PROCEDURE
dns.pdns_any_query can't return a result set in the given context

Thanks for any pointers :)

 -Cheers Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20080818/1ceed96f/attachment.html>

More information about the Pdns-users mailing list