The pool was shut down
PNixx opened this issue · 3 comments
I catch error
\Amp\Parallel\Context\StatusError: The pool was shut down in vendor/amphp/parallel/src/Worker/ContextWorkerPool.php:221
#0 vendor/amphp/parallel/src/Worker/ContextWorkerPool.php(132): Amp\Parallel\Worker\ContextWorkerPool->pull()
#1 src/Process.php(313): Amp\Parallel\Worker\ContextWorkerPool->submit()
To fix the problem, only restarting the process helps. How to automatically restart a worker pool?
Are you receiving this on process shutdown? That's the only reason I can think of why this would be happening outside of explicitly calling shutdown()
on ContextWorkerPool
.
I started getting this error when the server ran out of RAM. Even when the memory was freed, the error continued to appear when using a worker pool. Only restarting the service fixed the error.
Came back around to looking at this. My thinking is still the same – something called shutdown()
or kill()
on the pool instance to cause this exception.
Please take a deeper look at what might be happening here if this is still an issue for you. If you find something, please reopen this issue or create a new one.