Hello.

In effect the pdns was idle all night, as we test only during office time ;-) MySQL is local on the machine were pdns resides. MySQL 'wait_timeout' is 28800 seconds, 8 hours, so it is very likely it timed out during the night.

Once it will be in service I think it has work enough to do to not go in timeout.

Thanks,
Thomas

Am 29.09.2021 um 11:08 schrieb Pieter Lexis via Pdns-users:
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@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

_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to