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

SMTP server is blocking on the IO thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • master, 3.8.0, 3.8.1
    • 3.9.0, 3.8.2
    • POP3Server, SMTPServer
    • None

    Description

      While conducting a routine flame graph analysis [attached] I realized some file calls where done on the event loop [screenshot attached]

      By printing the thread that performs the enqueuing I was able to confirm this:

      ENQUEUING on smtpserver-io-1
      

      Blocking on the netty eventloop blocks all other concurrent requests to that thread and can cause significant delays by making the overall server irresponsive. This shall be avoided at all cost!

      By reworking slightly the Netty pipeline, and relying on the eventExecutorGroup for the core handler this had effectively been mitigated:

      ENQUEUING on smtpserver-0
      

      Attachments

        1. cnb-imap-29-03-2024.html
          1.40 MB
          Benoit Tellier
        2. Screenshot from 2024-03-29 16-30-53.png
          211 kB
          Benoit Tellier

        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 - 50m
                50m