Uploaded image for project: 'ejabberd development'
  1. ejabberd development
  2. EJAB-206

Keep alive query to maintain relational database connections

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ejabberd 1.1.0, ejabberd 1.1.1, ejabberd 1.1.2, ejabberd 1.1.3
    • Fix Version/s: ejabberd 2.0.0
    • Labels:
      None

      Description

      This should keep all connections used even on virtual hosts with limited traffic.

      1. ejabber_odbc_sup.patch
        2 kB
        Jérôme Sautret
      2. keepalive_sql.patch
        3 kB
        Jérôme Sautret
      3. send_timeout_v2.patch
        4 kB
        Jérôme Sautret

        Issue Links

          Activity

          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          This patch adds a

          {odbc_keepalive_interval, 28800}

          local option to perform a "SELECT 1;" request at a given interval (in seconds, 8 hours in the above example, which is the default timeout for MySQL) on all open SQL connections.

          It also adds a

          {odbc_pool_size, 10}

          local option to set the size of the pool of open SQL connections, which still default to 10 if option missing.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - This patch adds a {odbc_keepalive_interval, 28800} local option to perform a "SELECT 1;" request at a given interval (in seconds, 8 hours in the above example, which is the default timeout for MySQL) on all open SQL connections. It also adds a {odbc_pool_size, 10} local option to set the size of the pool of open SQL connections, which still default to 10 if option missing.
          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          Patch added.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - Patch added.
          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          Note that the keepalive feature is deactivated if odbc_keepalive_interval if not used.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - Note that the keepalive feature is deactivated if odbc_keepalive_interval if not used.
          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          new version of the patch, using timer:apply_interval.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - new version of the patch, using timer:apply_interval.
          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          New version of the patch, using timer:apply_interval.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - New version of the patch, using timer:apply_interval.
          Hide
          jsautret@process-one.net Jérôme Sautret added a comment -

          Commited in revision #879.

          Show
          jsautret@process-one.net Jérôme Sautret added a comment - Commited in revision #879.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development