Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21049

Error when sending mails to a number of recipients exceeding the mail sender queue capacity

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 14.4.6
    • Mail
    • None
    • Unknown

    Description

      When preparing mails for a number of recipients exceeding the MailSender queue capacity, the PrepareMailRunnable thread stops instead of waiting.

      Steps to reproduce

      On a default install with default mail sender queue capacities (= 1000): send mail to more than 1000 recipients over the MailSender API.

      Actual result

      XWiki throws the following error and only approximately 1000 mail are prepared:

      java.lang.IllegalStateException: Queue full
      	at java.base/java.util.AbstractQueue.add(AbstractQueue.java:98)
      	at org.xwiki.mail.internal.thread.AbstractMailQueueManager.addToQueue(AbstractMailQueueManager.java:53)
      	at org.xwiki.mail.internal.thread.PrepareMailRunnable.prepareSingleMail(PrepareMailRunnable.java:190)
      	at org.xwiki.mail.internal.thread.PrepareMailRunnable.prepareMail(PrepareMailRunnable.java:123)
      	at org.xwiki.mail.internal.thread.PrepareMailRunnable.run(PrepareMailRunnable.java:78)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      Workaround: increase queue capacity

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: