Adding Data Query to Host Times Out / Results in HTTP 500

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
allanparsons
Posts: 3
Joined: Sat Sep 01, 2012 1:58 am

Adding Data Query to Host Times Out / Results in HTTP 500

Post by allanparsons »

I'm running:

General Information
Cacti Version 0.8.8a
Cacti OS win32
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.2.x
PHP Version 5.4.2

I added a SQL Host (SNMP was none, Ping was None) which holds ~100 MSSQL Databases. I'm using this method to gather basic stats (for now, database size) for each database. I added a Data Query (which runs ok via the command line... see below). But, whenever I associate the Data Query to my host, it times out. If I go back into the host, I see the data query is added, but it's unable to pull the index.

I sifted through troubleshooting guides in the lead dev's signature. I increased timeouts for my app pool, php, and FastCGI (see below) to at least 300s (600s in some cases) and memory from 128m to 256m.

Script Timeout 90
Max OID 10
PHP Information

PHP OS WINNT
PHP uname Windows NT AMAZONA-33464RV 6.1 build 7601 (Windows Server 2008 R2 Datacenter Edition Service Pack 1) i586
PHP SNMP Not Installed
max_execution_time 600
memory_limit 256M

I used ProcMon, but don't see any permission issues. And my logs seem ok (below).

I was wondering if anyone could provide additional guidance. I'm kind of stuck - when I add a data query manually, a 500 error gets thrown (it seems there is a timeout):


INDEX RUN MANUALLY:

Code: Select all

D:\wwwroot\cacti.zzz.com\cacti\scripts\zzz_azsql_pollcentral.php ss_zzz_azuredbhealth abs123.database.windows.net index *
P0AZUSNC_P00000
P0AZUSNC_P00001
P0AZUSNC_P00002
P0AZUSNC_P00003
P0AZUSNC_P00004
P0AZUSNC_P00005
P0AZUSNC_P00006
P0AZUSNC_P00007
P0AZUSNC_P00008
P0AZUSNC_P00009
P0AZUSNC_P00010
P0AZUSNC_P00011
P0AZUSNC_P00012
P0AZUSNC_P00013
P0AZUSNC_P00014
P0AZUSNC_P00015
P0AZUSNC_P00016
P0AZUSNC_P00017
P0AZUSNC_P00018
P0AZUSNC_P00019
P0AZUSNC_P00020
P0AZUSNC_P00021
P0AZUSNC_P00022
P0AZUSNC_P00023
P0AZUSNC_P00024
P0AZUSNC_P00025
P0AZUSNC_P00026
P0AZUSNC_P00027
P0AZUSNC_P00028
P0AZUSNC_P00029
P0AZUSNC_P00030
P0AZUSNC_P00031
P0AZUSNC_P00032
P0AZUSNC_P00033
P0AZUSNC_P00034
P0AZUSNC_P00035
P0AZUSNC_P00036
P0AZUSNC_P00037
P0AZUSNC_P00038
P0AZUSNC_P00039
P0AZUSNC_P00040
P0AZUSNC_P00041
P0AZUSNC_P00042
P0AZUSNC_P00043
P0AZUSNC_P00044
P0AZUSNC_P00045

LOG FILES:

Code: Select all

09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_arrays'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_arrays'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT * FROM plugin_realms ORDER BY plugin, display"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT id FROM plugin_realms WHERE plugin = 'superlinks' AND file = 'superlinks.php'"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT id FROM plugin_realms WHERE plugin = 'superlinks' AND file = 'superlinks-mgmt.php'"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='112'"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_settings'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_settings'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'valid_host_fields'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'valid_host_fields'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:11 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_form'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_form'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_insert'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'config_insert'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "select cacti from version"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'auth_alternate_realms'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'auth_alternate_realms'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "select id from user_auth where username='0'"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select   user_auth_realm.realm_id   from   user_auth_realm   where user_auth_realm.user_id='1'   and user_auth_realm.realm_id='3'"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT 1 AS id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'device_action_array'  AND ph.name IN ('settings', 'boost', 'dsstats')  UNION  SELECT pc.id, ph.name, ph.file, ph.function  FROM plugin_hooks AS ph  LEFT JOIN plugin_config AS pc  ON pc.directory=ph.name  WHERE ph.status = 1 AND hook = 'device_action_array'  AND ph.name NOT IN ('settings', 'boost', 'dsstats')  ORDER BY id ASC"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "select data_input.type_id from (snmp_query,data_input) where snmp_query.data_input_id=data_input.id and snmp_query.id=13"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Cell: "select xml_path from snmp_query where id=13"
09/24/2012 07:27:12 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM host WHERE id=12"

ERROR 500:

Code: Select all

Server Error in Application "DEFAULT WEB SITE"
Internet Information Services 7.5
Error Summary
HTTP Error 500.0 - Internal Server Error
C:\php\php-cgi.exe - The FastCGI process exceeded configured request timeout
Detailed Error Information
Module	FastCgiModule
Notification	ExecuteRequestHandler
Handler	PHP-FastCGI
Error Code	0x80070102
Requested URL	http://graph.zzz.com:80/cacti/host.php?action=query_verbose&id=13&host_id=12
Physical Path	D:\wwwroot\cacti.zzz.com\cacti\host.php
Logon Method	Anonymous
Logon User	Anonymous
Most likely causes:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Things you can try:
Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
Check the event logs to see if any additional information was logged.
Verify the permissions for the DLL.
Install the .NET Extensibility feature if the request is mapped to a managed handler.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Links and More Information
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
View more information »

Microsoft Knowledge Base Articles:

294807
allanparsons
Posts: 3
Joined: Sat Sep 01, 2012 1:58 am

Re: Adding Data Query to Host Times Out / Results in HTTP 50

Post by allanparsons »

Figured it out.
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: Adding Data Query to Host Times Out / Results in HTTP 50

Post by artagel »

Share your solution with everyone else.
Please mark the topic solved if this resolves your problem.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Adding Data Query to Host Times Out / Results in HTTP 50

Post by gandalf »

artagel wrote:Share your solution with everyone else.
+1
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests