python-web-perf
python-web-perf copied to clipboard
Improve docs and try some other things
I've just been running on my mac (with the intention of trying to run up in the cloud later), have hit the following (I assume I have something configured wrong):
- If I bench against
PWPWORKERS=n ./serve-gunicorn-fastapi-async.sh
wheren > 1
I get a load ofResourceWarning: Unclosed 2 connections in <aiopg.pool.Pool object ...>
messages and everything breaks. I found this with withstarlette
too. - If I bench against
PWPWORKERS=n ./serve-gunicorn-fastapi.sh
wheren = anything
I get the odd catastrophicpsycopg2.pool.PoolError: connection pool exhausted
error.
The first one I have no idea.
Second one could feasibly be what Armin is on about. People are using these things in the wild, so not sure how they're avoiding this stuff (maybe they're simply not loading their systems very heavily).
I added a commit that uses asyncpg
, but it didn't make much difference (despite the hacker news chat), so reverted.
It's probs worth setting --log-level warning
on uvicorn
too.