MailFetcherService holds on to memory for each message until end of service run

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 3.7
    • Affects Version/s: None
    • Component/s: Email notifications
    • None

      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.

              Assignee:
              Unassigned
              Reporter:
              Nick Menere [Atlassian] (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: