python-web-perf icon indicating copy to clipboard operation
python-web-perf copied to clipboard

Improve docs and try some other things

Open leontrolski opened this issue 4 years ago • 0 comments

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):

  1. If I bench against PWPWORKERS=n ./serve-gunicorn-fastapi-async.sh where n > 1 I get a load of ResourceWarning: Unclosed 2 connections in <aiopg.pool.Pool object ...> messages and everything breaks. I found this with with starlette too.
  2. If I bench against PWPWORKERS=n ./serve-gunicorn-fastapi.sh where n = anything I get the odd catastrophic psycopg2.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.

leontrolski avatar Jun 19 '20 10:06 leontrolski