I have big Problem my server's 16Gb RAM
$scan_pol = new \Pool(2000);
$range = ip_range($start_range, $last_range);
foreach ($range as $ip_num => $ip_value) {
$scan_pol->submit(new scan($ip_value));
}
I submit in $scan_pol 16581375 Task
unset($range);
while ($scan_pol->collect()); // here i want to edit
$scan_pol->shutdown();
and while I see the Performance in Task Manager the memory usage Excessively increasing to full and popup this error snapshot
then stop CLI
I want while collect Tasks delete task from memory to balance memory usage
NOTE: I changed Pool Threads 2000 to 1000
and tried to Reduce $range
Array To reduce the pressure on the RAM but same problem
because collect after Terminated Task don't unset
it from memory
Any help please
Thank You