django icon indicating copy to clipboard operation
django copied to clipboard

Disable persistent database connections for ASGI compatibility

Open mulka opened this issue 4 months ago • 0 comments
trafficstars

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.

mulka avatar Jul 16 '25 00:07 mulka