NUM_CLIENTS=100
NUM_CONNECTIONS=20000
NUM_WORKERS_SYNC=12
NUM_WORKERS_ASYNC=6
NUM_DB_SESSIONS=100
DB_SLEEP=0.02
First run : gunicorn 20.0.4 with meinheld 1.0.2 -> gunicorn 20.0.4 -> gunicorn 20.0.4 with gevent 20.9.0
Second run : gunicorn 20.0.4 with meinheld 1.0.2 -> gunicorn 20.0.4 with gevent 20.9.0 -> gunicorn 20.0.4
For gunicorn 20.0.4, I saw a lot of failure at the beginning of the run but not at the end.
And the exception raised inside the perf-app container.
[2020-11-30 15:14:39,832] ERROR in app: Exception on /test [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/app_flask.py", line 10, in test
a, b = get_row()
File "/app/sync_db.py", line 17, in get_row
conn = psycopg2.connect(dbname='test', user='test', password='test',
File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Cannot assign requested address
Is the server running on host "perf-dbpool" (172.21.0.4) and accepting
TCP/IP connections on port 5432?
➜ ~ docker run --rm busybox cat /proc/sys/net/ipv4/ip_local_port_range
32768 60999
➜ ~ docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:36 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:06 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683