AE Fork Pool reaping problem
mjw at methodanalysis.com
Wed Mar 15 12:50:03 CET 2017
I've been using AnyEvent::Fork::Pool for a while now in a Mojolicious server environment, and it works well, but I recently introduced retirement of worker processes after a certain number of jobs, and discovered this results in zombies.
Not every retirement does, some are clearly reaped fine, and the ratio of defunct processes to retirements does vary quite a bit (no clue why / according to what), but there are a lot.
After requesting retirement the child receives and completes remaining jobs, and the worker return value of the last job, is received fine by the parent, a new worker is spawned, it's just that the old process is still there, some of the time.
Defunct process never result from the worker pool spinning down processes because it is idle, only ever when workers request to be retired.
Any ideas on what might be the problem?
More information about the anyevent