]> git.mxchange.org Git - friendica.git/commitdiff
Some more places were we check now
authorMichael <heluecht@pirati.ca>
Sat, 29 Apr 2017 17:45:09 +0000 (17:45 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 29 Apr 2017 17:45:09 +0000 (17:45 +0000)
boot.php
include/poller.php

index d8b9cbf241fce7e58ba214e901e1d6f7b4cc99bb..99af7d3778c1012e3312647deac47eaf63388224 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1420,6 +1420,10 @@ class App {
 
                $cmdline = implode($args, " ");
 
+               if ($this->min_memory_reached()) {
+                       return;
+               }
+
                if (get_config('system', 'proc_windows')) {
                        $resource = proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__));
                } else {
index 9641819885d0e3dc4ed786eaf44ba8ecc40a3096..8f9f5aa24debfd6599916d713cdeb26f9c04db2e 100644 (file)
@@ -71,6 +71,11 @@ function poller_run($argv, $argc){
 
        while ($r = poller_worker_process()) {
 
+               // Check free memory
+               if ($a->min_memory_reached()) {
+                       return;
+               }
+
                // Count active workers and compare them with a maximum value that depends on the load
                if (poller_too_much_workers()) {
                        return;