Some more places were we check now
This commit is contained in:
		
					parent
					
						
							
								715e15cbe1
							
						
					
				
			
			
				commit
				
					
						9d9909cf10
					
				
			
		
					 2 changed files with 9 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								boot.php
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue