File tree Expand file tree Collapse file tree 8 files changed +58
-11
lines changed Expand file tree Collapse file tree 8 files changed +58
-11
lines changed Original file line number Diff line number Diff line change 4
4
/.state
5
5
/staticfiles
6
6
.coverage
7
+ /memray- *
Original file line number Diff line number Diff line change 1
- FROM python:3.13-alpine
1
+ FROM python:3.13
2
2
3
- RUN apk add --no-cache bash
3
+ RUN apt install bash
4
4
5
5
ENV PYTHONUNBUFFERED=1
6
6
ENV PYTHONDONTWRITEBYTECODE=1
7
7
RUN mkdir /code
8
8
WORKDIR /code
9
9
COPY requirements.txt /tmp/requirements.txt
10
+
10
11
RUN --mount=type=cache,target=/root/.cache/pip \
11
12
pip install -r /tmp/requirements.txt
12
13
Original file line number Diff line number Diff line change 1
1
release : python manage.py migrate
2
- web : gunicorn -c gunicorn.conf.py clabot.asgi:application --log-file -
2
+ web : memray run --native --follow-fork -f -m gunicorn -c gunicorn.conf.py clabot.asgi:application --log-file -
3
3
worker : python manage.py db_worker
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ services:
24
24
25
25
web :
26
26
image : clabot:docker-compose
27
- command : python manage.py runserver 0.0.0.0:8000
27
+ command : memray run --native --follow-fork -f -m gunicorn -c gunicorn.conf.dev.py clabot.asgi:application --log-file -
28
28
environment : *base_environment
29
29
ports :
30
30
- " 8000:8000"
Original file line number Diff line number Diff line change
1
+ bind = '0.0.0.0:8000'
2
+ worker_class = "clabot.workers.UvicornWorker"
3
+ workers = 1
4
+
5
+ backlog = 2048
6
+ preload_app = True
7
+ #max_requests = 2048
8
+ #max_requests_jitter = 128
9
+
10
+ timeout = 60
11
+ keepalive = 2
12
+
13
+ errorlog = "-"
14
+ loglevel = "info"
15
+ accesslog = "-"
16
+ access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(M)'
Original file line number Diff line number Diff line change 1
1
bind = "unix:/var/run/cabotage/cabotage.sock"
2
2
worker_class = "clabot.workers.UvicornWorker"
3
- workers = 2
3
+ workers = 1
4
4
5
5
backlog = 2048
6
6
preload_app = True
7
- max_requests = 2048
8
- max_requests_jitter = 128
7
+ # max_requests = 2048
8
+ # max_requests_jitter = 128
9
9
10
10
timeout = 60
11
11
keepalive = 2
Original file line number Diff line number Diff line change @@ -23,3 +23,7 @@ sentry_sdk
23
23
servestatic
24
24
stamina
25
25
uvicorn
26
+
27
+ # Debug
28
+ memray
29
+ pystack
Original file line number Diff line number Diff line change @@ -108,16 +108,29 @@ iniconfig==2.1.0
108
108
# via pytest
109
109
isort == 6.0.1
110
110
# via -r requirements.in
111
+ jinja2 == 3.1.6
112
+ # via memray
113
+ linkify-it-py == 2.0.3
114
+ # via markdown-it-py
111
115
markdown == 3.7
112
116
# via django-markdownx
113
- markdown-it-py == 3.0.0
114
- # via rich
117
+ markdown-it-py [linkify,plugins ]== 3.0.0
118
+ # via
119
+ # mdit-py-plugins
120
+ # rich
121
+ # textual
122
+ markupsafe == 3.0.2
123
+ # via jinja2
115
124
marshmallow == 3.26.1
116
125
# via environs
117
126
mccabe == 0.7.0
118
127
# via flake8
128
+ mdit-py-plugins == 0.4.2
129
+ # via markdown-it-py
119
130
mdurl == 0.1.2
120
131
# via markdown-it-py
132
+ memray == 1.17.1
133
+ # via -r requirements.in
121
134
mypy-extensions == 1.0.0
122
135
# via black
123
136
oauthlib == 3.2.2
@@ -136,7 +149,9 @@ pillow==11.1.0
136
149
pip-tools == 7.4.1
137
150
# via -r requirements.in
138
151
platformdirs == 4.3.7
139
- # via black
152
+ # via
153
+ # black
154
+ # textual
140
155
pluggy == 1.5.0
141
156
# via pytest
142
157
psycopg2-binary == 2.9.10
@@ -165,6 +180,8 @@ pyproject-hooks==1.2.0
165
180
# via
166
181
# build
167
182
# pip-tools
183
+ pystack == 1.4.1
184
+ # via -r requirements.in
168
185
pytest == 8.3.5
169
186
# via
170
187
# -r requirements.in
@@ -179,7 +196,10 @@ python-dotenv==1.1.0
179
196
requests == 2.32.3
180
197
# via -r requirements.in
181
198
rich == 13.9.4
182
- # via django-typer
199
+ # via
200
+ # django-typer
201
+ # memray
202
+ # textual
183
203
sentry-sdk == 2.25.1
184
204
# via -r requirements.in
185
205
servestatic == 3.0.1
@@ -196,6 +216,8 @@ stamina==25.1.0
196
216
# via -r requirements.in
197
217
tenacity == 9.1.2
198
218
# via stamina
219
+ textual == 3.1.1
220
+ # via memray
199
221
twisted [tls ]== 24.11.0
200
222
# via daphne
201
223
txaio == 23.1.1
@@ -207,8 +229,11 @@ typing-extensions==4.13.0
207
229
# dj-database-url
208
230
# django-stubs-ext
209
231
# django-tasks
232
+ # textual
210
233
# twisted
211
234
# typer-slim
235
+ uc-micro-py == 1.0.3
236
+ # via linkify-it-py
212
237
uritemplate == 4.1.1
213
238
# via gidgethub
214
239
urllib3 == 2.3.0
You can’t perform that action at this time.
0 commit comments