[Pdns-users] Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: MySQL server has gone away

Catalin Constantin dazoot at gmail.com
Tue Jan 29 13:04:46 UTC 2008


Hello,

This is a funny question.
Mysql is FINE and it's up and running on localhost.

Here is the startup log of PDNS.
Jan 29 14:59:05 k2 pdns[30294]: PowerDNS 2.9.20 (C) 2001-2006
PowerDNS.COMBV (Mar 10 2007, 00:36:58, gcc
4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) starting up
Jan 29 14:59:05 k2 pdns[30294]: PowerDNS comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it according to
the terms of the GPL version 2.
Jan 29 14:59:05 k2 pdns[30294]: Set effective group id to 109
Jan 29 14:59:05 k2 pdns[30294]: Set effective user id to 113
Jan 29 14:59:05 k2 pdns[30294]: Creating backend connection for TCP
Jan 29 14:59:05 k2 pdns[30294]: Master/slave communicator launching
Jan 29 14:59:05 k2 pdns[30294]: gmysql Connection succesful
Jan 29 14:59:05 k2 pdns[30294]: gmysql Connection succesful
Jan 29 14:59:05 k2 pdns[30294]: About to create 10 backend threads for UDP
Jan 29 14:59:05 k2 pdns[30294]: gmysql Connection succesful
Jan 29 14:59:05 k2 pdns[30294]: 14 slave domains need checking
Jan 29 14:59:05 k2 pdns[30294]: Domain test1.com is stale, master serial
1201611548, our serial 1201610827
Jan 29 14:59:05 k2 pdns[30294]: Domain test2.com is stale, master serial
1201611548, our serial 1201610827
Jan 29 14:59:05 k2 pdns[30294]: Domain test3.com is stale, master serial
1201611548, our serial 1201610827
Jan 29 14:59:05 k2 pdns[30294]: gmysql Connection succesful
Jan 29 14:59:05 k2 pdns[30294]: AXFR started for 'test1.com', transaction
started
Jan 29 14:59:05 k2 pdns[30294]: gmysql Connection succesful
Jan 29 14:59:05 k2 pdns[30294]: AXFR done for 'test1.com', zone committed


The problem is that mysql closes the connection if there is no activity.
PDNS does not make sure that MySQL is still "alive" and from time to time it
shows in the log errors like:
Jan 29 11:33:57 k2 pdns[28941]: Backend error: Failed to execute
mysql_query, perhaps connection died? Err=1: MySQL server has gone away

Does PDNS have a timeout for backend connection "recheck" ?
Can this be configured ?

Is there anything we can do to make sure the connection does not go away ?

Note: the NS server activity for now is not much (we're still testing and
just have a couple of domains on it).

Thanks,

On 1/29/08, Nico van Royen <nico at van-royen.nl> wrote:
> Hello,
>
> Do you infact have a running mysql server ?  Also check the database that
> you have specified in your pdns.conf matches your actual database
> information (db name, user/password etc).
>
> Regards,
> Nico
> WARP3.COM
> ________________________________
> From: Catalin Constantin [mailto:dazoot at gmail.com]
> To: pdns-users at mailman.powerdns.com
> Sent: Tue, 29 Jan 2008 10:48:09 +0100
> Subject: [Pdns-users] Backend error: Failed to execute mysql_query,
perhaps
> connection died? Err=1: MySQL server has gone away
>
>
> Hello,
>
> We're getting quite many errors:
> Backend error: Failed to execute mysql_query, perhaps connection died?
> Err=1: MySQL server has gone away latelly.
>
> I checked the docs and the mailing lists for this error and i found
> little informations about it.
>
> What is actually the solution for this error not to happen ?
> Nice would be to have a real example.
>
> Note:
> - we use latest pdns package from Debian Etch (stable).
>
> Thanks,
>
> --
> Catalin Constantin
> Dazoot Software
> http://www.dazoot.eu/
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
>
>


-- 
Catalin Constantin
Dazoot Software
http://www.dazoot.eu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20080129/1b396bea/attachment-0001.html>


More information about the Pdns-users mailing list