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> |
||
|---|---|---|
| .. | ||
| routers | ||
| services | ||
| __init__.py | ||
| config.py | ||
| database.py | ||
| main.py | ||
| models.py | ||
| prompts.py | ||
| schemas.py | ||