[Pdns-users] Constantly increasing memory usage
zaphodb at zaphods.net
Mon Oct 17 17:17:35 UTC 2011
On Mon, Oct 17, 2011 at 5:40 PM, admin at cu.cc <admin at cu.cc> wrote:
> I am not sure is this is the right email to contact, but here is my issue:
As PowerDNS is OSS this is the right place to such questions.
> We are using power dns 2.9.21 (We had that installed for us, so I am not
> 100% sure if this is really the exact version, is there a way to check?).
rpm -qa pdns-server should tell if i remember correctly.
> The installation is myslq backended running on centos-5-x86_64 VPS. We are
> offering a free domain registration and have more that 20 000 domains for
> which provide free DNS services. The problem is that in the last few weeks
> when the server is started its ram would constantly increase until it
> reached 10GB and our VPS crashed. Once we run the command /etc/init.d/pdns
> restart the ram of the VPS gets back to normal levels of 700-1000 MB. This
> was happening every 2-3 hours yesterday and we were forced to set a cronjob
> that would restart pdns every hour to avoid server downtime, but it is not a
> permanent resolution. I have read in forums people discussing that this is a
> bug which is caused by failed MySQL connections that are not completely
> closed and gather with the time and little by little consume the whole
> server memory. This was mainly noticed on configurations with less traffic.
> The difference with us however is that we have around 10K visitors per day
> on our main site only, so I am not sure if the problem is identical.
> Please advise how to resolve this issue.
When the relevant values are left unconfigured (i.e. on default)
PowerDNS will gladly use up all available memory if there is enough
data in the mysql db (dataset) that is actually queried by enough
people (working set).
You should tune max-cache-entries and cache-ttl, negquery-cache-ttl,
query-cache-ttl and eventually recursive-cache-ttl accordingly. Be
warned that if you set these too low it will impact performance.
The same goes for MySQL as well of course.
If setting all of these tuneables does not help you might have
stumbled upon a memory leak however those were really seldomly spotted
2.9.21 is a few years old already and contains a security issue fixed
in 22.214.171.124. You should really look into upgrading to 3.0. See
http://www.powerdns.com/content/downloads.html for a rpm.
More information about the Pdns-users