Skip to content

Commit

Permalink
Set max-memory-per-child value for celery to fix memory leak issue
Browse files Browse the repository at this point in the history
  • Loading branch information
StreetLamb committed Aug 29, 2024
1 parent 26677ae commit c75127c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ QDRANT__SERVICE__API_KEY=changethis

# Flower
FLOWER_BASIC_AUTH=admin:changethis

# Celery
MAX_MEMORY_PER_CHILD='512000' # Useful for potential memory leaks - default 500MB
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ services:
volumes:
- app-backend-model-cache:/app/cache
- app-upload-data:/app/upload-data
command: poetry run celery -A app.core.celery_app.celery_app worker --loglevel=info --uid=celery --gid=celery
command: poetry run celery -A app.core.celery_app.celery_app worker --loglevel=info --uid=celery --gid=celery --max-memory-per-child=${MAX_MEMORY_PER_CHILD?Varible not set}
depends_on:
- redis
- backend
Expand Down

0 comments on commit c75127c

Please sign in to comment.