[Pdns-users] Crappy DNS query make Mysql/Pdns crash

Antoine Levavasseur pdns at vava.org
Mon Mar 29 16:04:23 UTC 2004


Hi,

I have noticed for some time now that my pdns server occasionnaly
crash just after breaking 10000 query-queue limit.

After investigating, I have noticed that query with
'%20' caracters leads to a LIKE query to MySQL thats really kicks it out
and leads to pdns restarting when breaking 10000 q in query-queue.


After reading documentation, it seems that LIKE query should only be used 
in case of fancy-records activated.

But in the backend code ANY '%' inside leads to a SQL LIKE query
which is really heavy for a loaded MySQL server.

So why theses queries are just issued without any LIKE instruction
as Fancyrecords are not activated.



By the way, in my log '%20toto.mydomain.com' query is just
"discarded as malformed qdomain '%20toto.mydomain.com' dropping"

But a 'www.%20toto.mydomain.com' query leads to a 
select content,ttl,prio,type,domain_id,name from records where type='NS'
and name like '%20toto.mydomain.com' and domain_id='1'
and lock the MySQL server for some time which can be fatal for my
pdns instance.



Any idea to prevent this problem are welcomed.

Regards.

-- 
Antoine.



More information about the Pdns-users mailing list