celery / billiard

Multiprocessing Pool Extensions
Other
419 stars 252 forks source link

FORKED_BY_MULTIPROCESSING not being set anymore #247

Open anoopknight opened 6 years ago

anoopknight commented 6 years ago

According to the changelog, the FORKED_BY_MULTIPROCESSING environment variable is supposed to be set by billiard when multiprocessing is used. This does not seem to be the actual behavior anymore. Celery depends on this environment variable being set for the prefork pool to work properly on Windows. I don't see any mention in the changelog as to why this was removed. Is there a reason this was removed, and can we have it restored?

anoopknight commented 6 years ago

This has been mentioned as a solution to the crash here, but it seems we shouldn't have to manually set FORKED_BY_MULTIPROCESSING. billiard should be doing it automatically?

wonderfulsuccess commented 6 years ago

Does 'FORKED_BY_MULTIPROCESSING=1' have any side effect in a production environment?

anoopknight commented 6 years ago

As far as I can tell, it is only used by celery to know if a prefork pool is being used on Windows. I don't see any other use for it.