graph_image.php fails to render a graph with 736 items.
Moderators: Developers, Moderators
-
- Posts: 4
- Joined: Fri Jun 12, 2009 4:13 pm
graph_image.php fails to render a graph with 736 items.
I have a graph with 736 items being stacked. The graph image doesn't load... shows a broken image after 1 second. The headers on the image say HTTP 200, but length 0.
I can use graph debug mode to obtain the rrdtool command... and running said command manually produces a valid PNG... but graph_image.php fails silently. I've turned on php error logging... didn't show anything. cacti-0.8.8, centos (2.6.32-279.9.1.el6.centos.plus.x86_64), plenty of disk space and memory free, PHP 5.3.3, out of ideas over here... I have the rrdtool command that I copied right out of the webui (attached)... that runs fine, but not via the web ui.
If anyone has any ideas on debugging PHP, or just knows that I have too many items (and how to fix), that'd be great
I can use graph debug mode to obtain the rrdtool command... and running said command manually produces a valid PNG... but graph_image.php fails silently. I've turned on php error logging... didn't show anything. cacti-0.8.8, centos (2.6.32-279.9.1.el6.centos.plus.x86_64), plenty of disk space and memory free, PHP 5.3.3, out of ideas over here... I have the rrdtool command that I copied right out of the webui (attached)... that runs fine, but not via the web ui.
If anyone has any ideas on debugging PHP, or just knows that I have too many items (and how to fix), that'd be great
- Attachments
-
- rrdtool.txt
- (132.99 KiB) Downloaded 266 times
-
- Cacti User
- Posts: 111
- Joined: Fri Sep 28, 2012 6:52 pm
Re: graph_image.php fails to render a graph with 736 items.
To debug PHP, configure your php.ini to display errors on the page:
and to set the debugging level:
and restart Apache. Post the results after that.
Code: Select all
display_errors = On
Code: Select all
error_reporting = E_ALL & E_STRICT
-
- Posts: 4
- Joined: Fri Jun 12, 2009 4:13 pm
Re: graph_image.php fails to render a graph with 736 items.
Same... empty response, no error. (EDIT: I tested from the web UI and also the cli (as shown below)) If I simply delete some of the items in the graph (to bring the total number down) it works... but I haven't determined exactly what the limit is, or if its consistent graph to graph. It is affecting 3-4 of my graphs at this point (the 3-4 largest ones, as for item count).
Code: Select all
[user@netmon100 ~]$ grep -e ^error_reporting -e ^display_errors /etc/php.ini
error_reporting = E_ALL & E_STRICT
display_errors = On
Code: Select all
[user@netmon100 ~]$ sudo /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Code: Select all
[user@netmon100 cacti]$ php-cgi graph_image.php action=view local_graph_id=8969 rra_id=5
X-Powered-By: PHP/5.3.3
Content-type: image/png
Code: Select all
[user@netmon100 cacti]$ curl -v "http://cacti.mydomain.net/graph_image.php?action=view&local_graph_id=8969&rra_id=5"
* About to connect() to cacti.mydomain.net port 80 (#0)
* Trying 10.8.0.5... connected
* Connected to cacti.mydomain.net (10.8.0.5) port 80 (#0)
> GET /graph_image.php?action=view&local_graph_id=8969&rra_id=5 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: cacti.mydomain.net
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 21 May 2013 06:03:59 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Last-Modified: Tue, 21 May 2013 06:03:59 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< P3P: CP="CAO PSA OUR"
< Set-Cookie: Cacti=t6lv6mktup9ijcgaeepolv2056; path=/
< Content-Length: 0
< Connection: close
< Content-Type: image/png
<
* Closing connection #0
[user@netmon100 cacti]$
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: graph_image.php fails to render a graph with 736 items.
Check you command line length limits:
On my Centos this is 131072 ( or 128kb )
your rrdtool command has a size of 133944 characters, so it wouldn't be able to run it on my Centos system. Will it do on yours ?
Code: Select all
[server ]# getconf ARG_MAX
131072
your rrdtool command has a size of 133944 characters, so it wouldn't be able to run it on my Centos system. Will it do on yours ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Posts: 4
- Joined: Fri Jun 12, 2009 4:13 pm
Re: graph_image.php fails to render a graph with 736 items.
Code: Select all
[user@netmon100 ~]$ getconf ARG_MAX
2621440
Thanks for the suggestion tho!
-
- Posts: 4
- Joined: Fri Jun 12, 2009 4:13 pm
Re: graph_image.php fails to render a graph with 736 items.
i had to say,i got the same problem with you,my max item number of graph was 760,and i'm debuging it now and try to find out why
Have you fixed this problem?
Have you fixed this problem?
Re: graph_image.php fails to render a graph with 736 items.
@gandalf
can you help us?
i think we are the most loyal users of cacti,we had made cacti in important use
can you help us?
i think we are the most loyal users of cacti,we had made cacti in important use
Re: graph_image.php fails to render a graph with 736 items.
hi,can u tell me your progress of this problem?nullrouten wrote:ping.
Re: graph_image.php fails to render a graph with 736 items.
Any word on this? I have the exact same issue. I'm building aggregate graphs and the individual graphs work, but when I stack them together, the graphs with too many items fail silently.
Re: graph_image.php fails to render a graph with 736 items.
Answered my own question. I straced the system call that HTTP was passing to rrdtool.gajillion wrote:Any word on this? I have the exact same issue. I'm building aggregate graphs and the individual graphs work, but when I stack them together, the graphs with too many items fail silently.
[/* 6 vars */]) = -1 E2BIG (Argument list too long)
This is an OS limitation and not a whole lot you can do about it.
Re: graph_image.php fails to render a graph with 736 items.
I had the same problem and I found what was the reason. Try to remove popen function from disabled_functions list in your php.ini file.
After I did that my graphs work like a charm. Here is more detailed instruction: http://druss.pp.ua/2014/11/solution-cac ... lem-fixed/ (I used it to solve this problem).
After I did that my graphs work like a charm. Here is more detailed instruction: http://druss.pp.ua/2014/11/solution-cac ... lem-fixed/ (I used it to solve this problem).
Re: graph_image.php fails to render a graph with 736 items.
Hello,
Sorry for forum diging... and Sorry for my English.
Is there some new information about the popen command line limit that is really lesser than the OS limit ? Did a bug was open for PHP ?
I have to make work a 1200 DataSources Aggregated Graph :/
Sorry for forum diging... and Sorry for my English.
Is there some new information about the popen command line limit that is really lesser than the OS limit ? Did a bug was open for PHP ?
I have to make work a 1200 DataSources Aggregated Graph :/
Who is online
Users browsing this forum: No registered users and 1 guest