Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UPSTREAM CHANGES] latest changes as of Mon Jun 27 2022 00:26:19 GMT+0000 (Coordinated Universal Time) #18

Merged
merged 4 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions bin/run-celery-with-beat.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env bash
set -e

CONCURRENCY="${CONCURRENCY:-2}"

echo "Start celery with CONCURRENCY: $CONCURRENCY"

exec celery -A glitchtip worker -l info -B -s /tmp/celerybeat-schedule --concurrency=$CONCURRENCY
exec celery -A glitchtip worker -l info -B -s /tmp/celerybeat-schedule
6 changes: 1 addition & 5 deletions bin/run-celery.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env bash
set -e

CONCURRENCY="${CONCURRENCY:-2}"

echo "Start celery with CONCURRENCY: $CONCURRENCY"

exec celery -A glitchtip worker -l info -s /tmp/celerybeat-schedule --concurrency=$CONCURRENCY
exec celery -A glitchtip worker -l info -s /tmp/celerybeat-schedule
15 changes: 2 additions & 13 deletions bin/run-uwsgi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ set -e

UWSGI_LISTEN="${UWSGI_LISTEN:-128}"
PORT="${PORT:-8000}"

MIN_WORKERS="${MIN_WORKERS:-4}"
INITIAL_WORKERS="${INITIAL_WORKERS:-6}"
MAX_WORKERS="${MAX_WORKERS:-8}"
OVERLOAD_TIME="${OVERLOAD_TIME:-30}"
UWSGI_THREADS=${UWSGI_THREADS:-1}

echo "Running uwsgi with INITIAL_WORKERS: $INITIAL_WORKERS, MIN_WORKERS: $MIN_WORKERS, MAX_WORKERS: $MAX_WORKERS, OVERLOAD_TIME: $OVERLOAD_TIME, THREADS: $UWSGI_THREADS"
CHEAPER_OVERLOAD="${UWSGI_CHEAPER_OVERLOAD:-30}"

exec uwsgi \
--module=glitchtip.wsgi:application \
Expand All @@ -20,15 +13,11 @@ exec uwsgi \
--log-format-strftime \
--http-socket=:$PORT \
--cheaper-algo=busyness \
--cheaper=$MIN_WORKERS \
--cheaper-initial=$INITIAL_WORKERS \
--workers=$MAX_WORKERS \
--cheaper-overload=$OVERLOAD_TIME \
--cheaper-overload=$CHEAPER_OVERLOAD \
--cheaper-step=1 \
--cheaper-busyness-max=50 \
--cheaper-busyness-min=25 \
--cheaper-busyness-multiplier=20 \
--threads=$UWSGI_THREADS \
--harakiri=60 \
--max-requests=10000 \
--die-on-term \
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ x-environment: &default-environment
DEBUG: "true"
EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
ENABLE_OBSERVABILITY_API: "true"
CELERY_WORKER_CONCURRENCY: 1

x-depends_on: &default-depends_on
- postgres
- redis
Expand All @@ -31,7 +33,7 @@ services:
worker:
build: .
user: root
command: celery -A glitchtip worker -B -s /tmp/celerybeat-schedule -l INFO
command: bin/run-celery-with-beat.sh
depends_on: *default-depends_on
volumes: *default-volumes
environment: *default-environment