On 11/3/20 5:08 PM, Valentin Kleibel wrote:
Hi,

We are using kallithea with a postgres database on another server connected via ssl. It seems that celery in version 4 uses prefork in its worker pool model now, which leads to issues with such a database connection:

I think you are right something is wrong.

First, the celery-run will not only take a config file as parameter and read it. It will also initialize the WSGI app and database connection, before calling into celery. Effectively making it pre-fork. I think you are right that we only should initialize things after celery has forked and started worker processes.

But also, it might be a bit odd that we have the celery-run entry point. It would perhaps be better to somehow use "celery" as entry point and let it call into Kallithea in each worker. But I haven't investigated how feasible that would be.

As a workaround, can you use celery.worker_concurrency = 1 but launch celery-run several times?

/Mads

_______________________________________________
kallithea-general mailing list
[email protected]
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to