Uploaded image for project: 'Spring AMQP'
  1. Spring AMQP
  2. AMQP-762

Semaphore permit leak leads to “No available channels” exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.6.10, 2.0 M5, 1.7.3
    • Fix Version/s: 1.6.11, 1.7.4, 2.0 RC1
    • Component/s: None
    • Labels:

      Description

      Let's say we have a consumer using CachingConnectionFactory with channelCheckoutTimeout being set to a value greater than zero.
      When we experience connection drop, a semaphore permit is being obtained but is never released.
      This over time leads to exhaust (leak) of permits, and in the end to the AmqpTimeoutException("No available channels") being thrown because there are no more permits to acquire.

      More detailed explanation of the issue and the example on how to reproduce this behavior can be find in linked Stack Overflow question story.

      Code causing this behavior can be find here.

        Attachments

          Activity

            People

            • Assignee:
              grussell Gary Russell
              Reporter:
              matejrisek Matej Risek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: