Curtis Cook
Curtis Cook
im running into the same issue - memory usage slowly builds over time, runnign on gunicorn with 4 uvicorn workers
Reading through the uvicorn code.. adding the max-requests effectively just restarts the server as soon as you hit some arbitrary number of requests? https://github.com/encode/uvicorn/blob/e77e59612ecae4ac10f9be18f18c47432be7909a/uvicorn/main.py#L537-L539 I can't find any good documentation...
Hi, I actually have not solved my memory leak issue but it's small enough to not be a huge concern. I'm also seeing the memory leak in other async processes...
I haven't tested outside of docker containers/ heroku docker containers
> update: > > I add `async` before `def` and it worked > refer: [#596 (comment)](https://github.com/tiangolo/fastapi/issues/596#issuecomment-647704509) > > ``` > @router.get('/tsp/crontab') > def tsp_crontab_schedule(topic: schemas.AgentPushParamsEnum..) > pass > ``` >...
> Related to #596, that issue already contains a lot of workarounds and information, please follow the updates over there. It looks like #596 is due to using def instead...
> Python Version: 3.8.9 > FastAPI Version: 0.67.0 > Environment: Linux 5.12.7 x86_64 > > We are able to consistently produce a memory leak by using a synchronous Depends: >...
FWIW -- you may have luck switching to hypercorn workers (plus you get http/2)
> Hello guys I and my colleagues had a similar issue and we solved it. > > After profiling we found out the coroutines created by uvicorn did not disappear...
I came here to ask the same question. I'm planning on namespacing my semver tags to make monorepo management easier. Prefixes are much more clear than postfixes for sorting releases...