Skip to content

Commit aabfdf6

Browse files
committed
update gunicorn to load from a .py file, tune max-requests
1 parent 4e9d3fd commit aabfdf6

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: gunicorn -c gunicorn.conf -k aiohttp.worker.GunicornWebWorker conveyor.app:application
1+
web: gunicorn -c gunicorn.conf.py -k aiohttp.worker.GunicornWebWorker conveyor.app:application

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ python3 -m venv .state/venv
2727
.state/venv/bin/pip install -r requirements.txt
2828
export CONVEYOR_ENDPOINT=https://pypi.python.org
2929
export DOCS_BUCKET=pypi-docs
30-
.state/venv/bin/gunicorn -k aiohttp.worker.GunicornWebWorker conveyor.app:application
30+
.state/venv/bin/gunicorn -b 127.0.0.1:8000 -k aiohttp.worker.GunicornWebWorker conveyor.app:application
3131
```
3232

3333
## Deployment

gunicorn.conf

Lines changed: 0 additions & 14 deletions
This file was deleted.

gunicorn.conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
bind = "unix:/var/run/cabotage/cabotage.sock"
2+
backlog = 2048
3+
max_requests = 2048
4+
max_requests_jitter = 128
5+
6+
worker_connections = 1000
7+
timeout = 60
8+
keepalive = 2
9+
10+
errorlog = "-"
11+
loglevel = "info"
12+
accesslog = "-"
13+
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
14+
15+
16+
def when_ready(server):
17+
open("/tmp/app-initialized", "w").close()

0 commit comments

Comments
 (0)