Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3746

IDLE mailbox listener leak

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.7.0
    • master, 3.8.0, 3.7.1
    • IMAPServer, mailbox
    • None

    Description

      What

      On a production instance running James 3.7.0 I have 2900 + IDLE listeners for only 58 IMAP connections. Something is clearly wrong here!

      See attached screenshot.

      A code audit showed that the listener associated with IMAP IDLE is only removed when the use inputs "DONE" to close the IDLE command.

      If the connection is unexpectedly dropped then the listener is never removed!

      This is even more critical that this keeps the UID-MSN mapping in memory forver .

      The fix

      This is fixed on master (upcoming 3.8.0) as we no longer put a distinct registration for IMAP IDLE but reuse the connection for the Selected mailbox.

      Selected mailbox is cleaned up upon disconnection, deselection etc.. so we don't need to worry.

      Also it puts less of a churn on RabbitMQ component as IDLE becomes essentially a hook on the SelectedMailboxImpl listener.

      I propose to backport this to 3.7.1...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              btellier Benoit Tellier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m