Dhclient requests filling memory

centos6.2dhclientdhcpmemorymemory usage

Dammit Jim, I'm a web developer, not a sys admin.

With that out of the way, my client's has a CentOS server (6.2) that is only serving a single Magento site (and the associated MySQL server) and it is frequently running out of memory, despite the site only currently being open to 5 users. I'm investigating the logs to try to figure out why the memory usage is so high, but I don't really know what I'm looking at.

It seems that there are a lot of entries in /var/log/messages concerning DHCP requests, approximately one every 15 seconds, that look like this:

Apr  7 14:23:06 s15940039 dhclient[815]: DHCPREQUEST on eth0 to 172.30.102.85 port 67 (xid=0x6b5cd2a7)

Is this normal? I don't see anything else in here that I don't recognise, but then I'm not sure I'd know the problem if I did see it. 4 days ago the server ran out of memory completely and locked up, requiring a restart. The DHCP messages did not start up again for 23 hours, but then carried on as before.

I have read this question which describes the same issue, but in my case a fresh DHCP lease does not ever seem to be issued. Is this something I should push back to the hosting provider, or have I not yet found the source of the memory problem?

Best Answer

I highly doubt that dhclient is consuming all of your memory, it is a very simple daemon. Have you used tools like top and sar to track your memory usage in real time and historically? I suggest you start analyzing the memory usage of your web application and web application server over time, perhaps using in-application monitoring or an external tool like Cacti or Munin.

Additionally, I'd suggest using statically assigned addresses, if that's something your hosting provider will allow. dhclient and a DHCP infrastructure are just one more moving part that could break.