Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-11046

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 3.7
    • None
    • Email notifications
    • 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

          Activity

            People

              Unassigned Unassigned
              nick.menere Nick Menere [Atlassian] (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: