Skip to content

Conversation

mulka
Copy link

@mulka mulka commented Jul 16, 2025

Summary

  • Set conn_max_age=0 in database configuration to disable persistent connections
  • This change is recommended by Django documentation for ASGI applications

Background

When using ASGI, persistent connections can cause issues with connection pool exhaustion and resource contention. Each long-lived ASGI connection could hold its own persistent database connection, quickly exhausting the database connection pool.

Set conn_max_age=0 in database configuration to disable persistent
connections, as recommended by Django documentation for ASGI applications.
This prevents connection pool exhaustion and resource contention issues
when handling many concurrent async connections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant