Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7450

How to calculate the maximum number of Redis connections

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not a Bug
    • Icon: Critical Critical
    • None
    • 2.6 GA
    • Backend
    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • undefined

      Current Behaviour

      When a failover in Redis is performed (Redis sentinels configuration) the following error log is observed

      backend-listener-4-8kq7x.180821.txt:2021-08-18 17:13:20 +0100: Rack app error: #<Redis::ConnectionError: Connection lost (ECONNRESET)>
      

      This is normal and expected and the number of times it is logged is based on the following formula and should therefore be anywhere between that range:

      n replicas * 16 && n replicas * (2*16)
      

      In this scenario there are 2 backend-listener replicas with the default number of worker process (16). The number of times the error is logged, however, is 51. We expect it to be at least 32 (unless some listener worker connections were idle and have been closed and so could be less than 32) and the maximum to be 64? Is that correct? There is at least one additional connection spawned by the listener worker for the queue storage as seen here.

      Expected behaviour

      An easy way to refer to the maximum number of connections that can be opened to Redis from the listener workers. This makes it easier to determine whether the number of error connections logged during a failover are within the expected range or not.

      Question: In addition to what is being asked above are there any other connections opened by the listener workers?

              Unassigned Unassigned
              rhn-support-keprice Kevin Price
              Petr Hála Petr Hála (Inactive)
              Kevin Price Kevin Price
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: