[
https://issues.apache.org/jira/browse/KARAF-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189221#comment-17189221
]
ASF GitHub Bot commented on KARAF-6837:
---------------------------------------
jbonofre commented on pull request #192:
URL: https://github.com/apache/karaf-decanter/pull/192#issuecomment-685720632
@coheigea can you please rebase on master ? I fixed a random failure on
socket appender (impacting Jenkins). Thanks !
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Place a bound on the data read in the rest servlet + socket collectors
> ----------------------------------------------------------------------
>
> Key: KARAF-6837
> URL: https://issues.apache.org/jira/browse/KARAF-6837
> Project: Karaf
> Issue Type: Improvement
> Components: decanter
> Reporter: Colm O hEigeartaigh
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: decanter-2.6.0
>
>
> This task is to place a bound on the amount of data read in the rest servlet
> + socket collectors, as otherwise BufferedReader.readLine() will block until
> all data is read, potentially leading to a java.lang.OutOfMemoryError: Java
> heap space error.
> e.g. I see on sending a large file to the rest servlet collector:
> <table>
> <tr><th>URI:</th><td>/decanter/collect/rest-servlet</td></tr>
> <tr><th>STATUS:</th><td>500</td></tr>
> <tr><th>MESSAGE:</th><td>java.lang.OutOfMemoryError: Java heap space</td></tr>
> <tr><th>SERVLET:</th><td>org.ops4j.pax.web.service.spi.model.ServletModel-5</td></tr>
> <tr><th>CAUSED BY:</th><td>java.lang.OutOfMemoryError: Java heap
> space</td></tr>
> </table>
> <pre>java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:3332)
> at
> java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
> at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:596)
> at java.lang.StringBuilder.append(StringBuilder.java:190)
> at java.io.BufferedReader.readLine(BufferedReader.java:370)
> at java.io.BufferedReader.readLine(BufferedReader.java:389)
> at
> org.apache.karaf.decanter.collector.rest.servlet.RestServletCollector.doPost(RestServletCollector.java:86)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)