Issues with Cacti running very long rrdtool commands

Ryan Garland <[email protected]> Wed, 22 Oct 2014 21:47:24 -0700
Newsgroups gmane.network.cacti.user
Message-ID <CAOHB+0h4xFnsvb_AeU2sU7+3J=7w-zv+3VgBDPzR9KtynP-__g@mail.gmail.com>
I believe I am running into a character limit for the commands that rrdtool
can successfully run.

I currently have a stacked aggregate graph with 1376 line items (3/4 of
which are the Legend lines).  This graph renders just fine, and with Debug
mode turned on, after the long rrdtool command, rrdtool returns "OK".  The
character count of the command (including any white space) of this command
is 132961.  (Yes, I know that's a lot - I have my reasons :))

However, as soon as I add a new line item to the graph, the graph no longer
renders, and with Debug mode turned on, rrdtool does not return OK -- it
merely shows nothing.  The character count of this command is 133204.

Here's the kicker:  When the failing rrdtool command is manually ran at the
system's command prompt, the command succeeds.  It seems that only within
Cacti does the rrdtool command not work.

I have done a lot of research and found some seemingly related information
( such as http://www.mail-archive.com/[email protected]/msg05522.html )
which discusses command length limitations by the OS / kernel, limiting to
131072 MAX_ARG_STRLEN, but:

1) this number is slightly lower than the length of the full rrdtool
command that is succeed, and
2) if that was the problem, the command should not succeed when manually
run at the command prompt

So what is Cacti doing when it runs rrdtool that could be limiting the
command length?  Does anyone have any suggestions as to how to resolve this
apparent limitation?

Any help is appreciated.  Software versions listed below.

Cacti Version 0.8.8a
PHP Version 5.3.10-1ubuntu3.14
Ubuntu Version 12.04
RRDTool Version 1.4.x

Ryan
------------------------------------------------------------------------------