[Pdns-users] Error when querying a domain on PDNS authoritative for first time
Pieter Lexis
pieter.lexis at powerdns.com
Wed Sep 29 09:08:46 UTC 2021
Hi Thomas,
On 9/29/21 10:46, Thomas via Pdns-users wrote:
> Hello.
>
> We are testing pdns and would like to migrate to it in few days. Now I
> have seen errors showing up in the pdns logs when I first query a domain
> and (I presume) this domain is not in cache of pdns.
>
> Error ist the following:
>
> Backend reported permanent error which prevented lookup (GSQLBackend
> unable to lookup 'limitis.com|ANY':Could not prepare statement: SELECT
> content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> disabled=0 and name=? and domain_id=?: MySQL server has gone away),
> aborting
"MySQL server has gone away" means that the connection to the database
was interrupted or closed. PowerDNS uses separate connections for TCP
and UDP queries that come in. It might be that your server gets so few
queries that MySQL terminates the idle connection(s).
You could try increasing the wait_timeout and maybe connect_timeout as well.
If the database is running on another machine or VM, I suggest you check
the network-path is this keeps happening.
> I activated general_log in MariaDB but do no see any error when this
> statements are executed or in the error_log:
>
> 210929 10:25:57 14 Connect pdns at localhost as anonymous on pdns
> 14 Query SET SESSION TRANSACTION ISOLATION LEVEL
> READ COMMITTED
> 14 Prepare SELECT
> content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> disabled=0 and name=? and domain_id=?
> 14 Execute SELECT
> content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> disabled=0 and name='testdomain.eu' and domain_id=18787
> 14 Reset stmt
> 14 Prepare select kind,content from domains,
> domainmetadata where domainmetadata.domain_id=domains.id and name=?
> 14 Execute select kind,content from domains,
> domainmetadata where domainmetadata.domain_id=domains.id and
> name='testdomain.eu'
> 14 Reset stmt
This looks good!
> After restaring pdns the errors have gone away, but seems strange to me.
> Where could this errors come from? MySQL connection timeouts maybe? But
> timeouts would result in the logs of mysql I'd asume.
I know too little of MySQL to know if it logs when it terminates a
connection due to inactivity.
Cheers,
Pieter
--
Pieter Lexis
PowerDNS.COM BV -- https://www.powerdns.com
More information about the Pdns-users
mailing list