Module: check_mk
Branch: master
Commit: a270e946230c8e6f5a9e995c33477c74fc26e027
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a270e946230c8e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 3 14:26:51 2015 +0200
#2337 FIX Fixed problem with long hanging pnp graph rendering calls
---
.werks/2337 | 10 ++++++++++
ChangeLog | 1 +
pnp-templates/default.php | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/2337 b/.werks/2337
new file mode 100644
index 0000000..bbd0415
--- /dev/null
+++ b/.werks/2337
@@ -0,0 +1,10 @@
+Title: Fixed problem with long hanging pnp graph rendering calls
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i2
+Date: 1433334397
+
+
diff --git a/ChangeLog b/ChangeLog
index f4b300e..c37dd47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
* 2261 FIX: Fixed wrong pnp template cache path in non OMD environments...
* 2262 FIX: Fixed deletion of foreign views/dashboards...
* 2335 FIX: Fixed PNP default template for active checks with arguments...
+ * 2337 FIX: Fixed problem with long hanging pnp graph rendering calls
BI:
* 2336 FIX: BI compilation diagnostics are now logged to the generic web.log...
diff --git a/pnp-templates/default.php b/pnp-templates/default.php
index 067c58f..8a7e4bc 100644
--- a/pnp-templates/default.php
+++ b/pnp-templates/default.php
@@ -39,6 +39,10 @@ else
# cache file missing or stale: try to fetch live template via HTTP
if ($cache_state != "uptodate")
{
+ // always speaking to local host, so a small connect timeout is good to
+ // catch to long hanging requests when e.g. the system apache is not
+ // listening on localhost
+ ini_set('default_socket_timeout', 2);
$fd = @fopen($url . "pnp_template.py?id=" . urlencode($id_string),
"r");
if ($fd) {
$data = "";