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 44/.state
55/staticfiles
66.coverage
7+ /memray- *
Original file line number Diff line number Diff line change 1- FROM python:3.13-alpine
1+ FROM python:3.13
22
3- RUN apk add --no-cache bash
3+ RUN apt install bash
44
55ENV PYTHONUNBUFFERED=1
66ENV PYTHONDONTWRITEBYTECODE=1
77RUN mkdir /code
88WORKDIR /code
99COPY requirements.txt /tmp/requirements.txt
10+
1011RUN --mount=type=cache,target=/root/.cache/pip \
1112 pip install -r /tmp/requirements.txt
1213
Original file line number Diff line number Diff line change 11release : 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 -
33worker : python manage.py db_worker
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ services:
2424
2525 web :
2626 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 -
2828 environment : *base_environment
2929 ports :
3030 - " 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 11bind = "unix:/var/run/cabotage/cabotage.sock"
22worker_class = "clabot.workers.UvicornWorker"
3- workers = 2
3+ workers = 1
44
55backlog = 2048
66preload_app = True
7- max_requests = 2048
8- max_requests_jitter = 128
7+ # max_requests = 2048
8+ # max_requests_jitter = 128
99
1010timeout = 60
1111keepalive = 2
Original file line number Diff line number Diff line change @@ -23,3 +23,7 @@ sentry_sdk
2323servestatic
2424stamina
2525uvicorn
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
108108 # via pytest
109109isort == 6.0.1
110110 # via -r requirements.in
111+ jinja2 == 3.1.6
112+ # via memray
113+ linkify-it-py == 2.0.3
114+ # via markdown-it-py
111115markdown == 3.7
112116 # 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
115124marshmallow == 3.26.1
116125 # via environs
117126mccabe == 0.7.0
118127 # via flake8
128+ mdit-py-plugins == 0.4.2
129+ # via markdown-it-py
119130mdurl == 0.1.2
120131 # via markdown-it-py
132+ memray == 1.17.1
133+ # via -r requirements.in
121134mypy-extensions == 1.0.0
122135 # via black
123136oauthlib == 3.2.2
@@ -136,7 +149,9 @@ pillow==11.1.0
136149pip-tools == 7.4.1
137150 # via -r requirements.in
138151platformdirs == 4.3.7
139- # via black
152+ # via
153+ # black
154+ # textual
140155pluggy == 1.5.0
141156 # via pytest
142157psycopg2-binary == 2.9.10
@@ -165,6 +180,8 @@ pyproject-hooks==1.2.0
165180 # via
166181 # build
167182 # pip-tools
183+ pystack == 1.4.1
184+ # via -r requirements.in
168185pytest == 8.3.5
169186 # via
170187 # -r requirements.in
@@ -179,7 +196,10 @@ python-dotenv==1.1.0
179196requests == 2.32.3
180197 # via -r requirements.in
181198rich == 13.9.4
182- # via django-typer
199+ # via
200+ # django-typer
201+ # memray
202+ # textual
183203sentry-sdk == 2.25.1
184204 # via -r requirements.in
185205servestatic == 3.0.1
@@ -196,6 +216,8 @@ stamina==25.1.0
196216 # via -r requirements.in
197217tenacity == 9.1.2
198218 # via stamina
219+ textual == 3.1.1
220+ # via memray
199221twisted [tls ]== 24.11.0
200222 # via daphne
201223txaio == 23.1.1
@@ -207,8 +229,11 @@ typing-extensions==4.13.0
207229 # dj-database-url
208230 # django-stubs-ext
209231 # django-tasks
232+ # textual
210233 # twisted
211234 # typer-slim
235+ uc-micro-py == 1.0.3
236+ # via linkify-it-py
212237uritemplate == 4.1.1
213238 # via gidgethub
214239urllib3 == 2.3.0
You can’t perform that action at this time.
0 commit comments