[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaConfig: workaround for GC issues...

git at icinga.org git at icinga.org
Thu Jun 30 12:18:24 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: cf424aa8ba7151292fae7ca1ea6ad947a09fa1d3
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=cf424aa8ba7151292fae7ca1ea6ad947a09fa1d3

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Jun 30 12:17:32 2016 +0200

IcingaConfig: workaround for GC issues...

...affecting RHEL/CentOS 7

fixes #12063

---

 library/Director/IcingaConfig/IcingaConfig.php |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php
index ae2d26b..1c774f6 100644
--- a/library/Director/IcingaConfig/IcingaConfig.php
+++ b/library/Director/IcingaConfig/IcingaConfig.php
@@ -372,8 +372,13 @@ class IcingaConfig
         $start = microtime(true);
 
         // Raise limits. TODO: do this in a failsafe way, and only if necessary
-        ini_set('memory_limit', '768M');
+        if ((string) ini_get('memory_limit') !== '-1') {
+            ini_set('memory_limit', '1024M');
+        }
+
         ini_set('max_execution_time', 0);
+        // Workaround for https://bugs.php.net/bug.php?id=68606 or similar
+        ini_set('zend.enable_gc', 0);
 
         if (! $this->connection->isPgsql() && $this->db->quote("1\0") !== '\'1\\0\'') {
 
@@ -402,6 +407,8 @@ class IcingaConfig
              ->prepend("library \"methods\"\n\n");
 
         PrefetchCache::forget();
+        IcingaHost::clearAllPrefetchCaches();
+
         $this->generationTime = (int) ((microtime(true) - $start) * 1000);
 
         return $this;



More information about the icinga-checkins mailing list