Details
Description
Django does not offer connection pooling or singleton object for database connection pool. Also Django opens a connection to the database when it first makes a database query. It keeps this connection open and reuses it in subsequent requests. Django closes the connection once it exceeds the maximum age defined by CONN_MAX_AGE or when it isn’t usable any longer.
Till now HUE Django code was not using CONN_MAX_AGE configuration value. By default CONN_MAX_AGE value is 0. Which means any request constantly opens up new connections which is an expensive operation.