[Pdns-users] MySQL backend and connection reuse

Xan Charbonnet xan at charbonnet.com
Mon Feb 5 20:52:29 UTC 2018


On 02/04/2018 11:15 PM, Xan Charbonnet wrote:
> Hello,
> 
> I'm working on migrating an installation from PowerDNS 3.1 on Debian 7
> "Wheezy" to PowerDNS 4.0.3 on Debian 9 "Stretch".
> 
> I'm using the MySQL backend, connected to MariaDB 10.1.30, which is not
> the Stretch default, but the one from the MariaDB repository.  I've
> tried the Stretch default PowerDNS 4.0.3, as well as PowerDNS 4.0.5 and
> PowerDNS 4.1.0 from the PowerDNS repository, and had the same problem.
> 
> I think fundamentally the problem I'm having boils down to this: the
> first time PowerDNS makes a basic-query, everything is fine.  Subsequent
> times, the response is somehow truncated, and/or a previously-seen SOA
> is returned.
> 
> It looks like the issue is between MariaDB and PowerDNS.  I set up socat
> as a logging proxy and observed that the first time I trigger a PowerDNS
> basic-query via dig, the exchanged traffic is ~10K.  The second time,
> it's ~4K.
> 
> If I kill the connection between PowerDNS and MariaDB, either by
> restarting MariaDB or simply by ordering MariaDB to kill the connection
> in use by PowerDNS, then the subsequent attempt fails because of the
> missing connection, but from then it's the same as the beginning: the
> next query after that will succeed and subsequent ones will fail.
> 
>   From the MariaDB command line I can make the exact queries that
> PowerDNS is making, verified by the MariaDB query log.  No problems
> there: no matter how many times I do that, I always get the full results.
> 
> I should mention that all my queries are stored procedures, in case that
> matters.  This all has worked perfectly on 3.1.
> 
> Any tips on what I should try next?  Thanks!


I believe this is the same issue resolved by this patch:
https://github.com/PowerDNS/pdns/pull/6134/commits/4fd90e75d47d6ec43d10c94ea260b08e50806442

I'll be porting that to Debian's 4.0.3 and recompiling.  I'll update 
here if it doesn't work, but I expect it will.


More information about the Pdns-users mailing list