Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
14.4.6
-
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