Skip to content

Fix support for API concurrency > 1 by updating Uvicorn launch logic #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DifferentialityDevelopment

Fix for the bug when launching the serverless worker locally with api concurrency > 1

I got the following error:
WARNING: You must pass the application as an import string to enable 'reload' or 'workers'.

As per my issue I created here
#407

Fix for the bug
WARNING:  You must pass the application as an import string to enable 'reload' or 'workers'.
@DifferentialityDevelopment
Copy link
Author

DifferentialityDevelopment commented Apr 10, 2025

I notice that running with concurrency is totally not a thing on Windows..
I was able to get it "working" on linux with the above changes
But it requires I give it test input data else the workers just exit immediately, if I just use concurrency = 1 then the worker persists.

I was going through all this to be able to stress test my application and gather data on per request memory usage, peak memory usage with different concurrency levels etc
Does concurrency_modifier even have any effect in development environment if testing with concurrency = 1
My worker handler itself is async

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant