So I ran into this problem at work today with an runit based service breaching open files limit.
My first thought was to increase the system ulimit for
/etc/security/limits.conf. I changed this
from 30k to about 60k. But strangely, the service still keep dying.
The latest Ubuntu releases makes it real easy to set up a local DNS cache for your workstation using dnscache from the well-known djbdns software by D. J. Bernstein.
For those who have historically installed djbdns/ucspi-tcp/daemontools from source because of distribution restrictions, things changed really for the better after DJB placed all these software in the public domain in 2007. You can now setup all this in about one minute! (depending on your Internet connection though.