Synchronous task execution blocks request handling
warningperformanceUpdated Dec 3, 2024(via Exa)
How to detect:
Long-running tasks execute synchronously in request handlers, blocking other requests and causing slow response times for concurrent users.
Recommended action:
Use Celery with a message broker (AMQP/RabbitMQ) to execute tasks asynchronously. Define tasks with @celery.task decorator. Call tasks with .delay() method to run them in background workers.