graphs.php loading forever without timeout

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

graphs.php loading forever without timeout

Post by Deele »

I'm trying to set up cacti version 0.8.7g on our Debian server.
Everything seems working fine, every page is opening fine, but after first time I opened "Graph Management", I can't open it again, it just keeps loading forever.
I tried googling this issue and here, by search, but found nothing promising.
My sys-admin says, it could be something about that cron job, but he will look at problem only tommorow more deeply.
As mentioned in documentation, I set up cron user to "cacti", later, set it to "www-data", later, to "root". No change. That page is still hanging, and not giving timeout too.
Cacti log file shows following:

Code: Select all

11/25/2010 04:35:01 PM - SYSTEM STATS: Time:0.2084 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:35:01 PM - SYSTEM STATS: Time:0.2083 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:35:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2010-11-25 16:35:01', '123')'
11/25/2010 04:35:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (6, 'users', '2010-11-25 16:35:01', '5')'
11/25/2010 04:35:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (5, '', '2010-11-25 16:35:01', '1min:0.00 5min:0.00 10min:0.00')'
11/25/2010 04:35:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (4, 'mem_swap', '2010-11-25 16:35:01', '1759076')'
11/25/2010 04:35:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (3, 'mem_buffers', '2010-11-25 16:35:01', '265364')'
11/25/2010 04:31:02 PM - SYSTEM STATS: Time:0.2080 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:27:01 PM - SYSTEM STATS: Time:0.2082 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:23:01 PM - SYSTEM STATS: Time:0.2089 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:19:01 PM - SYSTEM STATS: Time:0.2083 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:15:01 PM - SYSTEM STATS: Time:0.2179 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:15:01 PM - SYSTEM STATS: Time:0.2179 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:15:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2010-11-25 16:15:01', '120')'
11/25/2010 04:15:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (6, 'users', '2010-11-25 16:15:01', '5')'
11/25/2010 04:15:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (5, '', '2010-11-25 16:15:01', '1min:0.16 5min:0.03 10min:0.01')'
11/25/2010 04:15:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (4, 'mem_swap', '2010-11-25 16:15:01', '1759076')'
11/25/2010 04:15:01 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (3, 'mem_buffers', '2010-11-25 16:15:01', '290264')'
11/25/2010 04:10:01 PM - SYSTEM STATS: Time:0.2087 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:10:01 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 365 seconds have passed since the last poll!
11/25/2010 04:03:57 PM - SYSTEM STATS: Time:0.2087 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 04:00:02 PM - SYSTEM STATS: Time:0.2083 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 03:59:05 PM - AUTH LOGIN: User 'nils' Authenticated
11/25/2010 03:55:01 PM - SYSTEM STATS: Time:0.2084 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
11/25/2010 03:53:37 PM - AUTH LOGIN: User 'nils' Authenticated
11/25/2010 03:50:06 PM - AUTH LOGIN: User 'admin' Authenticated
11/25/2010 03:50:01 PM - SYSTEM STATS: Time:0.2272 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5 
Please, point me in right direction.
Thanks

Code: Select all

Technical Support
General Information
Date 	Thu, 25 Nov 2010 16:40:06 +0200
Cacti Version 	0.8.7g
Cacti OS 	unix
SNMP Version 	NET-SNMP version: 5.4.3
RRDTool Version 	RRDTool 1.4.x
Hosts 	1
Graphs 	4
Data Sources 	Script/Command: 5
Total: 5
Poller Information
Interval 	300
Type 	cmd.php
Items 	Action[1]: 5
Total: 5
Concurrent Processes 	1
Max Threads 	1
PHP Servers 	1
Script Timeout 	25
Max OID 	10
Last Run Statistics 	Time:0.2082 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
PHP Information
PHP Version 	5.3.3-3
PHP OS 	Linux
PHP uname 	Linux nils2 2.6.32-5-686 #1 SMP Tue Oct 19 14:40:34 UTC 2010 i686
PHP SNMP 	Installed
max_execution_time 	30
memory_limit 	128M
MySQL Table Information
(all OK)
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

not solved. I used another host to install on
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

The same thing now. I installed on other host, everything worked fine, created graphs, used Cacti for couple days and now again - bah - click on "Graph Management" is not making any progress. Maybe, some query or cycle is taking forever to compleate. Any solutions?
The request for that page is not eaven showing in httpd-access.log!
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

The thing is, I tried to open some in-history link - "/cacti/graphs.php?action=graph_edit&id=12" and it works. Looks like just first page "/cacti/graphs.php" which has index of graphs, is not loading. Any ideas?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: graphs.php loading forever without timeout

Post by phalek »

did you try to enable all debuggin in Cacti and had a look at the cacti log ?

It's also a good idea to enable error loggin in PHP. Look at your php.ini file for error logging and enable it ( set the target for the error log to a filename or the syslog ...)
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
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

phalek wrote:did you try to enable all debuggin in Cacti and had a look at the cacti log ?

It's also a good idea to enable error loggin in PHP. Look at your php.ini file for error logging and enable it ( set the target for the error log to a filename or the syslog ...)
Cacti has developer level debug mode.
PHP have

Code: Select all

error_reporting = E_ALL & ~E_NOTICE
I tried to remove all code from graphs.php, save, reload. Same stuff, it "hangs in air" somewhere between Apache, PHP & Cacti stuff...
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: graphs.php loading forever without timeout

Post by phalek »

you should check if your have uncommented the error_log entry, e.g.:

Code: Select all

; Log errors to syslog (Event Log on NT, not valid in Windows 95).
error_log = syslog
otherwise the php errors may not show up anywhere
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
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

phalek wrote:you should check if your have uncommented the error_log entry, e.g.:

Code: Select all

; Log errors to syslog (Event Log on NT, not valid in Windows 95).
error_log = syslog
otherwise the php errors may not show up anywhere
Yep, added this line (note, this is FreeBSD server) cant see any errors still, only those silly warnings

Code: Select all

<b>Warning</b>:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
Strange is that "/cacti/graphs.php?action=" is opening and showing that first page, but "/cacti/graphs.php" is loading forever... Where could be problem?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: graphs.php loading forever without timeout

Post by phalek »

I'd say you should try restarting the services and cehck afterwards if that solves the issue.

E.g. restart mysql -> then check if the rror is still occuring
then restart http ...

If restarting one of these services solves the issue, then you could dig into this a bit further ( e.g. increasing memory for php, or the max execution time ... )
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
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

phalek wrote:I'd say you should try restarting the services and cehck afterwards if that solves the issue.

E.g. restart mysql -> then check if the rror is still occuring
then restart http ...

If restarting one of these services solves the issue, then you could dig into this a bit further ( e.g. increasing memory for php, or the max execution time ... )
Not helping, restarted both, apache & mysql.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: graphs.php loading forever without timeout

Post by phalek »

does at least the top command show anything or ps -ef display some unusual tasks running at that moment ?

It may as well be an outdated php module which did not get updated to be compatible with PHP 5.3
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
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

phalek wrote:does at least the top command show anything or ps -ef display some unusual tasks running at that moment ?

It may as well be an outdated php module which did not get updated to be compatible with PHP 5.3

Code: Select all

nils# /usr/local/etc/rc.d/mysql-server restart
Stopping mysql.
Waiting for PIDS: 57566, 57566.
Starting mysql.
nils# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
[Wed Dec 01 12:00:34 2010] [warn] module php5_module is already loaded, skipping
Syntax OK
Stopping apache22.
Waiting for PIDS: 65959.
Performing sanity check on apache22 configuration:
[Wed Dec 01 12:00:36 2010] [warn] module php5_module is already loaded, skipping
Syntax OK
Starting apache22.
[Wed Dec 01 12:00:36 2010] [warn] module php5_module is already loaded, skipping
nils# 
What do you mean with "top command show anything or ps -ef display some unusual tasks running at that moment"?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: graphs.php loading forever without timeout

Post by phalek »

the

Code: Select all

top
and

Code: Select all

ps -ef
command on unix.

Compare the output of these commands to calling the graphs.php file with graphs.php?action= one and check for differences
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
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

phalek wrote:the

Code: Select all

top
and

Code: Select all

ps -ef
command on unix.

Compare the output of these commands to calling the graphs.php file with graphs.php?action= one and check for differences
My system-admin says, that that wont help.
The thing is, everything worked fine before. I just made some changes in templates/data sources etc, everything that I had done before and at some point, I wanted to check that list of graphs, and fail - wont load. Every other page is loading and all graphs are showing.
That looks like deeper problem, conserning headers or stuff... cause it is not eaven getting to parse PHP code, it just stops in... void...
"graphs.php?=" works "graphs.php" not working... Maybe, this question is to Apache forums, not here...
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: graphs.php loading forever without timeout

Post by Deele »

Mystery, today, after two days of monitoring, it is working again... Nothing had been changed...
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests