Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bind named service high cpu load [closed]

named service under CentOs 6 is using more 100% of all 4 processors. I tried to play around with the configuration files. I currently have like 10 websites. below is a sample

$TTL 14400
@       IN      SOA     ns1.mynameserver.com.      hostmaster.mydomain.com. (
                                                2012071300
                                                14400
                                                3600
                                                1209600
                                                86400 )

mydomain.com.   14400   IN  NS  ns1.mynameserver.com.
mydomain.com.   14400   IN  NS  ns2.mynameserver.com.

ftp 14400   IN  A   123.218.168.8
localhost   14400   IN  A   127.0.0.1
mail    14400   IN  A   123.218.168.8
pop 14400   IN  A   123.218.168.8
mydomain.com.   14400   IN  A   123.218.168.8
smtp    14400   IN  A   123.218.168.8
www 14400   IN  A   123.218.168.8

mydomain.com.   14400   IN  MX  10 mail
mydomain.com.   14400   IN  TXT "v=spf1 a mx ip4:123.218.168.8 ~all"

localhost   14400   IN  AAAA    ::1

and for mynameserver.com

$TTL 14400
@       IN      SOA     ns1.mynameserver.com.      hostmaster.mynameserver.com. (
                                                2012081200
                                                14400
                                                3600
                                                1209600
                                                86400 )

mynameserver.com.   14400   IN  NS  ns1.mynameserver.com.
mynameserver.com.   14400   IN  NS  ns2.mynameserver.com.

ftp 14400   IN  A   123.218.168.11
localhost   14400   IN  A   127.0.0.1
mail    14400   IN  A   123.218.168.11
ns1.mynameserver.com.   14400   IN  A   123.218.168.10
ns1.mynameserver.com.   14400   IN  A   123.218.168.11
ns2.mynameserver.com.   14400   IN  A   123.218.168.11
ns2.mynameserver.com.   14400   IN  A   123.218.168.11
pop 14400   IN  A   123.218.168.11
s1  14400   IN  A   123.218.168.11
smtp    14400   IN  A   123.218.168.11
mynameserver.com.   14400   IN  A   123.218.168.11
www 14400   IN  A   123.218.168.11
mynameserver.com.   14400   IN  MX  10 mail
mynameserver.com.   14400   IN  TXT "v=spf1 a mx ip4:123.218.168.8 ~all"
localhost   14400   IN  AAAA    ::1

i changed the ip and domains to make it a general question for everyone. Thing is i don't use mail or smtp at all, i might add MX records in the future and rely on gmail for example for emails. Is it safe to remove mail/pop/smtp/MX records?

Based on your experience what is causing this huge CPU load for several months!

like image 527
fawzib Avatar asked Oct 24 '12 22:10

fawzib


1 Answers

I had the same issue, and the information in the link posted by Starcalc above worked for me (though the post he linked is for Ubuntu). This is what I did for my CentOS 6.4 box:

In /etc/named.conf, ensure you have the line present in the options{} section

managed-keys-directory "/var/named/dynamic";

Also, make sure you have the directories /var/named/dynamic and /var/named/chroot/var/named/dynamic presesent, ensure all are owned by named:named (easy way: chown -R named:named /var/named ) and if you run with SELinux, do: restorecon -R /var/named/

like image 129
Soruk Avatar answered Nov 01 '22 16:11

Soruk