Tim Galvin
11/09/2023, 3:57 AMWEB_CONCURRENCY
item, which le
export WEB_CONCURRENCY=16
export PREFECT_SQLALCHEMY_POOL_SIZE=5
export PREFECT_SQLALCHEMY_MAX_OVERFLOW=10
My problem now though is that it is pretty easy to get the prefect server to crash with asyncio error referring to an excessive number of clients: sorry, too many clients already
I can mitigate this a little by slowing down the number of flows submitted to the SLURM scheduler - this is OK so long as my jobs are instantly allocated resources. But once my requests hit the SLURM scheduler I have no control over when and how many are started simulatenously.
So, I am left coming back to trying to understand the interplay and best practises around these asyncio clients, and these above variables. I am not sure whether these POOL_SIZE / MAX_OVERFLOW are a per process item (as uvicorn starts a number of workers to handling the incoming rest API traffic) or whether they are global across all processes. The latter doesn't make too much sense ot me, but I am questioning everything.
Are there any devs or community members who have insights on these variables, their interplay and this asyncio 'too many clients already' issue?