[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga-legacy-config-13049: HostApplyMatches: Raise memory_limit for bigger caches

git at icinga.org git at icinga.org
Fri Nov 11 10:44:02 CET 2016


Module: icingaweb2-module-director
Branch: feature/icinga-legacy-config-13049
Commit: 0529875db0e2e83428dfb4c4c2d2df8b0ddef081
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=0529875db0e2e83428dfb4c4c2d2df8b0ddef081

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Fri Nov 11 10:40:55 2016 +0100

HostApplyMatches: Raise memory_limit for bigger caches

refs #13049

---

 library/Director/Objects/HostApplyMatches.php |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/library/Director/Objects/HostApplyMatches.php b/library/Director/Objects/HostApplyMatches.php
index a6e6877..2b9c112 100644
--- a/library/Director/Objects/HostApplyMatches.php
+++ b/library/Director/Objects/HostApplyMatches.php
@@ -48,8 +48,16 @@ class HostApplyMatches
         return self::$flatObjects;
     }
 
+    protected static function raiseLimits()
+    {
+        ini_set('memory_limit', '768M');
+        ini_set('max_execution_time', 0);
+    }
+
     protected static function fetchFlatObjects(Db $db)
     {
+        self::raiseLimits();
+
         Benchmark::measure('HostApplyMatches: prefetching');
         PrefetchCache::initialize($db);
         $all = IcingaHost::prefetchAll($db);



More information about the icinga-checkins mailing list