[collectd] Too many open files

Domagoj Mikac domagoj.mikac at metronet.hr
Thu Aug 20 14:18:15 CEST 2009


Hi Florian, 

These two lines are not related (my mistake). The question is related
only to "Too many open files" errror message. 
I kind'a solved the problem by adding just 200 new devices at the time. 
Also, I set ulimit -n 15000 (i don't know if it helps or not) 
 
Currently I have 55382 RRD files for 2137 devices. 
This is my rrdtool plugin setting. 

LoadPlugin rrdtool
<Plugin rrdtool>
        DataDir "/opt/collectd/rrd"
        CacheTimeout    120
        CacheFlush      900
        WritesPerSecond 100
        RRATimespan     5184000, 16070400, 31622400, 63244800, 126489600
        RRARows         17280, 17280, 17520, 17520, 4380
</Plugin>

Also I have huge number of following error messages in log file:
	snmp plugin: host device_xyz: snmp_sess_synch_response failed: 

thanks
Domagoj



On Thu, 2009-08-20 at 12:22 +0200, Florian Forster wrote:
> Hi Domagoj,
> 
> On Wed, Aug 19, 2009 at 01:25:46PM +0200, Domagoj Mikac wrote:
> > [2009-08-19 12:15:56] rrdtool plugin: rrd_update_r (/opt/collectd/rrd/test.rrd) failed: opening '/opt/collectd/rrd/test.rrd': Too many open files
> > [2009-08-19 12:19:20] rrdtool plugin: rrd_update_r (/opt/collectd/rrd/test.rrd) failed: mmaping file '/opt/collectd/rrd/test2.rrd': Invalid argument
> 
> weird. Why could collectd think it updates “test.rrd” while librrd
> thinks it's supposed to update “test2.rrd”? And, why aren't there a host
> and plugin directory? Did you edit those messages?
> 
> > After starting collectd process it creats RRD files for only 1257
> > devices (RRDs for more than 1000 devices are not created, even though
> > I have enough free space on disk)
> 
> Can you please use ‘lsof’ or a similar tool to check *which* files are
> opened by collectd? Just because the ‘rrdtool’ plugin complains doesn't
> mean the fault really is there. In any case, it opens one RRD file at a
> time, so the ‘rrdtool’ plugin should be responsible for one open file
> descriptor only.
> 
> Regards,
> -octo



More information about the collectd mailing list