Use NullPool for Celery workers so connections are opened/closed per task instead of accumulating in per-process pools. Add worker_process_init signal to dispose inherited engines on fork. Keep QueuePool for the web service. Increase PostgreSQL max_connections to 200 as a safety net. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| celery_app.py | ||
| workers.py | ||