java.lang.OutOfMemoryError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When I load a 90MB file into a String and try to log it I get the following: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:40) at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:119) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:168) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:59) at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:134) at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:188) at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:206) at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:212) at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:175) at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:272) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:259) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:441) at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:413) at ch.qos.logback.classic.Logger.debug(Logger.java:506) ... Appender: ch.qos.logback.core.rolling.RollingFileAppender Pattern: %p %d{HH:mm:ss.SSS} %c:%L %X{DC4ParcelID} %m%n Maybe when the message is too big, it can use a more memory efficient method to log (or reduce functionality).
    via by James Stauffer,
  • When I load a 90MB file into a String and try to log it I get the following: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:40) at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:119) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:168) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:59) at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:134) at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:188) at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:206) at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:212) at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:175) at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:272) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:259) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:441) at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:413) at ch.qos.logback.classic.Logger.debug(Logger.java:506) ... Appender: ch.qos.logback.core.rolling.RollingFileAppender Pattern: %p %d{HH:mm:ss.SSS} %c:%L %X{DC4ParcelID} %m%n Maybe when the message is too big, it can use a more memory efficient method to log (or reduce functionality).
    via by James Stauffer,
  • Neo4J Traversal Running out of memory
    via Stack Overflow by KWyckmans
    ,
  • UncaughtExceptionHandler in tomcat
    via Stack Overflow by mreaevnia
    ,
    • java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:40) at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:119) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:168) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:59) at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:134) at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:188) at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:206) at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:212) at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:175) at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:272) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:259) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:441) at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:413) at ch.qos.logback.classic.Logger.debug(Logger.java:506)

    Users with the same issue

    Tahir
    2 times, last one,
    Handemelindo
    1 times, last one,
    Unknown visitor1 times, last one,
    harshg
    2 times, last one,
    sunils
    1 times, last one,
    57 more bugmates