Hi, i have 2 webpages wich i monitor with the http sensor (full webpage). One of the sensors is running fine. The other is very often running into error: Sensor timeout reached.

Both sensors are configured the same, but added to different devices. When i test the webpage from the faulting sensor manually myself with a browser, it's always loading fine without any problems.

Sensor Timeout is set very high, should not be the problem. What else should i check?

Probe is running local on a intel NUC miniPC. Webpage is hosted externally by all-inkl.com webhosting service.

Thank you very much


Article Comments

Hello,

Thank you very much for your KB-Post. Can you please share the full settings of both sensors for analysis?

Best regards.


Apr, 2016 - Permalink

Funktioniert: Zeitüberschreitung (Sek.): 30 URL: http://backyard-racing.ch Verwendeter Browser: Chromium (empfohlen) Sicherheitskontext: Sicherheitskontext des Probe-Dienstes verwenden (Standard) Sensoranzeige, Primärer Kanal: Ladezeit(ms) Diagrammtyp: Kanäle unabhängig anzeigen (Standard) Abtastintervall: 60 Sekunden Wenn der Sensor einen Fehler meldet: 1 Intervall Warning, 2 Fehler

Funktioniert nicht: Zeitüberschreitung (Sek.): 30 URL: http://www.racing-planet.ch Verwendeter Browser: Chromium (empfohlen) Sicherheitskontext: Sicherheitskontext des Probe-Dienstes verwenden (Standard) Sensoranzeige, Primärer Kanal: Ladezeit(ms) Diagrammtyp: Kanäle unabhängig anzeigen (Standard) Abtastintervall: 60 Sekunden Wenn der Sensor einen Fehler meldet: 1 Intervall Warning, 2 Fehler


Apr, 2016 - Permalink

Hello,

Could you please try using longer scanning interval (5 minutes) in the sensor that does not work? Does that help?


Apr, 2016 - Permalink

Hi

nope, unfortunately no. Sensor is running with 5min intervalls, and is failing constantly. Not 1 successfull measurement in the last hour.

From the same machine who runs the probe, i can access the page with any browser without any problems. Full load time is between 2 and 4 seconds constantly.

Regards Oliver


Apr, 2016 - Permalink

Hello,

I installed two sensors for these two web sites on the testing machine to check the issue.

So the first sensor, as you already mentioned, works fine.

The second one goes up and down sporadically, with the error message "sensor timeout reached", but there is no indication why it is so. This sensor type has a bug - no matter what you set under "Timeout" in the sensor Settings, the timeout value will be 10 seconds. So either the web page needs more than 10 s to load (what is not likely as full load time is 2-4 s) or there is another issue on the web server.

Could you please check the logs on the web server - is there anything that might be indicating an issue with web page loading?


Apr, 2016 - Permalink

Hi Isidora

ok i checked the accesslogs. I found no errors, but always the same file where the requests stops. I copied 3 blocks from the sensor request in the following txt for you to check:

https://www.dropbox.com/s/c6szqveqg16vhti/access_log_httpsensor.txt?dl=0

the blocks are not always the same count of requests, but always ends with this: 83.173.205.61 - - [28/Apr/2016:16:27:19 +0200] "GET /partner/1000/templates/racing_planet_002/images/1/header/seitenleiste_tel.png HTTP/1.1" 200 8036 "http://www.racing-planet.ch/" "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"

Maybee something wrong with that?

Thank you so much for getting in touch with this problem! But if you don't mind, please set the one sensor (who works) to pause again. If not it will mess up my google analytic measurements over the weekend, sorry... thanks!


Apr, 2016 - Permalink

Hi there,

this might be related to a bug in the HTTP sensor where the timeout setting is actually ignored. Could you install the following script in <PRTG APP DIRECTORY>\Custom Sensors\EXE:

param(
    [string]$uri = "www.google.de", 
    [int]$timeout = 1
)

try
{
    $Time = (Measure-Command {Invoke-WebRequest -Uri $uri -UseBasicParsing -TimeoutSec $timeout})
    $Response = (Invoke-WebRequest -Uri $uri -UseBasicParsing -TimeoutSec $timeout)
}
catch
{ Write-Host "99:Connection Timeout"; exit 2; }

Write-Host ([string]::Format("{0}:Page responded with Response Code {1}",$Time.Milliseconds,[int]$Response.StatusCode)); exit 0 

Simply save it as http-check.ps1. Create a new EXE/Script sensor on the device and select the script. Enter the URL in the parameter field. Until now, the script worked perfect and was always able to get a result. Can you try it? : )


Remarks

  • PowerShell v3 or newer is installed on the PRTG server or remote probe
  • Set-ExecutionPolicy RemoteSigned has been executed in a 32Bit PowerShell with admin privileges.

May, 2016 - Permalink