You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the code below (the run() function) I can see memory of the parent php process continually growing, I get the following when the code starts:
PHP Notice: unserialize(): Error at offset 0 of 74 bytes in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php on line 59
PHP Warning: shmop_open(): unable to get shared memory segment information in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php on line 89
PHP Warning: Invalid argument supplied forforeach()in vendor/kriswallsmith/spork/src/Spork/Fork.php on line 97
And eventually when the machine runs out of memeory I get this:
PHP Warning: shmop_open(): unable to attach or create shared memory segment in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php on line 89
PHP Fatal error: Uncaught exception 'Spork\Exception\ProcessControlException' with message 'Not able to create shared memory segment for PID: 14390'in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php:91
Stack trace:
#0 vendor/kriswallsmith/spork/src/Spork/ProcessManager.php(119): Spork\SharedMemory->send(Object(Spork\Util\ExitMessage), false)#1 [internal function]: Spork\ProcessManager->Spork\{closure}()#2 {main}
thrown in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php on line 91
PHP Fatal error: Uncaught exception 'Spork\Exception\ProcessControlException' with message 'Not able to create shared memory segment for PID: 14395'in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php:91
Stack trace:
#0 kriswallsmith/spork/src/Spork/ProcessManager.php(119): Spork\SharedMemory->send(Object(Spork\Util\ExitMessage), false)#1 [internal function]: Spork\ProcessManager->Spork\{closure}()#2 {main}
thrown in vendor/kriswallsmith/spork/src/Spork/SharedMemory.php on line 91
If I take out the spork code and run the code sequentially then the memory stays constant.
I've tried poking around in the spork library, but haven't had any luck. Any ideas or pointers?
//in constructor$this->manager = newProcessManager();
// I run this publicfunctionrun()
{
while (self::$enabled) {
if (count($this->workers) >= $this->workerLimit) {
$this->cleanUpWorkers();
}
$job = $this->fetchJobFromQueue();
$worker = $this->findWorkerForJob($job);
if ( ! $worker) {
thrownew \Exception("Could not find worker for {$job[0]} job");
}
$worker = $this->manager->fork($worker);
$this->workers[$worker->getPid()] = $worker;
}
}
privatefunctioncleanUpWorkers()
{
$this->manager->check();
foreach($this->workersas$pid => $worker) {
$worker->wait();
if ($worker->isExited()) {
unset($this->workers[$pid]);
}
}
return;
}
The text was updated successfully, but these errors were encountered:
When I run the code below (the run() function) I can see memory of the parent php process continually growing, I get the following when the code starts:
And eventually when the machine runs out of memeory I get this:
If I take out the spork code and run the code sequentially then the memory stays constant.
I've tried poking around in the spork library, but haven't had any luck. Any ideas or pointers?
The text was updated successfully, but these errors were encountered: