parallel icon indicating copy to clipboard operation
parallel copied to clipboard

The pool was shut down

Open PNixx opened this issue 1 year ago • 2 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?

PNixx avatar Jan 16 '24 08:01 PNixx

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.

trowski avatar Jan 28 '24 18:01 trowski

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.

PNixx avatar Jan 29 '24 07:01 PNixx

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.

trowski avatar Mar 24 '24 19:03 trowski