Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
Description
MailFetcherService contains the following code:
Message[] messages = folder.getMessages(); log.debug("There are " + messages.length + " messages in the " + protocol + " folder"); for (int i = 0; i < messages.length; i++) { try { Message message = messages[i]; //handle message (loads it from the server into memory } catch (Throwable t) { log.error("Throwable: " + t, t); } }
This will keep all loaded messages in memory until the end of the service.
Each message should be loaded and handled separately with memory released after.
If you are trying to read in 10 * 40MB files you could be looking at 800MB of memory consumed.
Attachments
Issue Links
- is related to
-
JRASERVER-11036 Fix MailHandler attachment code - CPU inefficient
- Closed