Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
/
File Attachments cause Out Of Memory problems
Published Mar 29, 2018

    File Attachments cause Out Of Memory problems

    Mar 29, 2018

    The below is an example stacktrace when processing an email with 17MB of attachments (encoded bulks up to 28MB!)  The solution to this is to add more memory to the heap, see https://confluence.atlassian.com/display/JIRA/Increasing+JIRA+Memory



    2014-04-05 17:10:14,175 QuartzScheduler_Worker-1 ERROR ServiceRunner [org.quartz.core.ErrorLogger] Job (DEFAULT.ServicesJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.OutOfMemoryError: Java heap space] at org.quartz.core.JobRunShell.run(JobRunShell.java:206) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --------------- java.lang.OutOfMemoryError: Java heap space at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:133) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220) at java.io.Writer.write(Writer.java:157) at org.apache.log4j.helpers.CountingQuietWriter.write(CountingQuietWriter.java:45) at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310) at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276) at org.apache.log4j.WriterAppender.append(WriterAppender.java:162) at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251) at com.atlassian.jira.logging.JiraHomeAppender.doAppend(JiraHomeAppender.java:243) at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66) at org.apache.log4j.Category.callAppenders(Category.java:206) at org.apache.log4j.Category.forcedLog(Category.java:391) at org.apache.log4j.Category.log(Category.java:838) at com.atlassian.jira.web.action.admin.mail.LogPrintStream.flush(LogPrintStream.java:29) at com.atlassian.jira.web.action.admin.mail.LogPrintStream.write(LogPrintStream.java:118) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104) at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185) at java.io.PrintStream.write(PrintStream.java:527) at java.io.PrintStream.print(PrintStream.java:669) at java.io.PrintStream.println(PrintStream.java:806) at com.atlassian.jira.web.action.admin.mail.LogPrintStream.println(LogPrintStream.java:111) at com.sun.mail.pop3.Protocol.issueCommand(Protocol.java:701) at com.sun.mail.pop3.Protocol.retr(Protocol.java:447) at com.sun.mail.pop3.POP3Message.getRawStream(POP3Message.java:175) at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:271) at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:99) at javax.mail.internet.MimeMultipart.parsebm(MimeMultipart.java:785) at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:503) at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:244) at com.javahollic.jira.emh.engine.support.EMHMailUtils.getBodyImpl(EMHMailUtils.java:1167)
    The Plugin People
    Teams
    , (opens new window)

    Knowledge Base
    • How-to articles
      How-to articles
       This trigger is hidden
    Results will update as you type.
    • Enterprise Mail Handler - JEMH - (Server/DataCenter)
      • Auditing History purge does not work with "Retain Failures" enabled (JIRA 7.x)
      • Concurrent mail retrieval resulting in duplicate issue creation
      • Configuration screen won't save updates
      • Creating duplicate issues to multiple projects fails
      • Diagnosing Slow or Stopped Incoming Mail
      • Duplicate issues are created when using JEMH and JIRA Data Center
      • Email client shows encoded attachment name instead of decoded file name
      • Enable Auto Labelling
      • Event Listener JSD issue transition notifications do not send if a comment is present in the transition
      • Exception during issue update validation for non-Service Desk issue
      • File Attachments cause Out Of Memory problems
      • Gmail confidential mode
      • How to supply a default value for the Tempo Account custom field
      • How to support email addresses with international characters
      • Issue fails to create with indexing errors
      • JEMH Is not yet licensed through Atlassian Marketplace
      • JIRA fires Issue Assigned event for newly created Issues
      • Jira Service Desk problems
      • Jira 7 *Wrong JVM Version!* Error
      • JSD Organization field
      • Mail fails to be retrieved from mail server
      • MYSQL exception - Caused by: java.sql.SQLException: Incorrect string value
      • MYSQL Duplicate entry '0'. No Valid License
      • Non-JIRA recipient custom field values have been updated but JEMH is notifying the old values
      • Notification History tab does not show on issues
      • Problems with IMAP
      • Problems with POP
      • Slow Jira startup with PostgreSQL
      • Sorry, you can't create any issues right now, as you need to have access to a JIRA application to be able to create issues
      • You do not have permission to assign issues
      • How to change the event type of a notified event
      • Diagnose no inbound mail handled
      • JSD (Jira Service Desk) - Who is notified when?
      • HTML extraction method to Wiki mark up
      • Setting System Fields using Script Field Processor
      • Test case editor fails to load
      • MessageRemovedException in log files during email processing
      • Characters appearing as question marks
      • UI not visible after upgrading to version 3+
      • Default Project Mapping and unwanted inheritance causing inbound mail to be forwarded
      • JEMH is disabled on startup in Manage Apps
      • Configure JSD Customers for use with JEMH
      • Custom Field values are cached causing recipients to not receive notifications (JIRA 7.3.0 - 7.3.4 , JEMH 2.1.0 - 2.1.11)
      • Restrict commenting to one project
      • Foreign key constraint violation during Audit Event history purge
      • Request participants not sent JEMH notification
      • Handling out of disk space
      • Profile import timeout error
      • Zendesk integration
      • Outlook sending formatting
      • Attachment links added as comments, Jira Service Management/Desk
      Calendars
    You‘re viewing this with anonymous access, so some content might be blocked.
    {"serverDuration": 12, "requestCorrelationId": "d9cb595b73be4e6d917aed80b046622d"}