Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-5959

[Backend] Enable Persistent connections using CONN_MAX_AGE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.12.0
    • Fix Version/s: 4.0.0
    • Component/s: core.api
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            • Assignee:
              ranade Prakash
              Reporter:
              ranade Prakash
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: