-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forks don't die #13
Comments
After some debugging I found out that if the data array has more than n elements (in my case is 7401 in but this could be just a random number) then the forks don't exit. I don't know if this could be memory or timeouts configurations. |
After a few more tests I found out that has to do with writing the results to the up fifo. |
Hi, @lightglitch. Could you test my patched version? It has pull requests #8 and #9 merged in. |
I didn't try it yet but if comment: // phone home
$fifo->send(array($result, $output, $error)); everything works as expected so the limit is probably the system fifo maxsize. |
Are you calling |
Yes, because I want to know when all forks ends. |
If you can write an example script that demonstrates this issue I'd be happy to look into it. |
I added a test in my fork to test it on travis: https://github.com/lightglitch/spork/commit/c6b84084d8c9a1fc3e3f77383da18353ab7afc6a it's pretty simple and hangs on travis. |
I have same issue. I' m call wait() on the process manager and it's never ends. :( in result i have big serialized array. But if i write something simpe, like return "work bitch"; it work, and wait() complete. maybe there some settings for result size ? |
Some example $fork = $this->sporkManager->process($requests_iterator, function($request) {
Minion_Cli::write(__METHOD__ . "request " . print_r($request, 1));
try
{
$asbresult = $this->asbProcessor->run($request);
Minion_Cli::write(__METHOD__ . "asbresult " . print_r($asbresult, 1));
return $asbresult;
}
catch (\Exception $exc)
{
return $exc->getMessage();
}
// return "work bitch";
});
$this->sporkManager->wait();
$results = $fork->getResult(); So i have there test output. $this->asbProcessor do some job, and return result. I have test output marked as "asbresult" and after this daemon stops and newer die. Please fix ! |
Now i write result to db in child and it's work. But it's not what i need. |
Spork will serialize whatever your callback returns. Is |
kriswallsmith, yes it is array or serialized array. I think problem in array size. Like write lightglitch upper i write better example in this issue |
Hi, I'm using this to do some benchmarks and I wanted to wait for the end of the forks, but they never die.
The callback stops being called but the forks don't exit, am I missing something?
The text was updated successfully, but these errors were encountered: