camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vova Shelgunov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-10399) OutOfMemoryError: Java heap space when sending large file to endpoint
Date Wed, 19 Oct 2016 09:58:58 GMT
Vova Shelgunov created CAMEL-10399:
--------------------------------------

             Summary: OutOfMemoryError: Java heap space when sending large file to endpoint
                 Key: CAMEL-10399
                 URL: https://issues.apache.org/jira/browse/CAMEL-10399
             Project: Camel
          Issue Type: Bug
          Components: camel-jetty
    Affects Versions: 2.18.0
         Environment: Debian inside docker container
            Reporter: Vova Shelgunov


My route and jetty configuration:

<route id="ds-rest-archive-upload-processor">
            <from uri="jetty:https://storage:8443/data/archive?sslContextParametersRef=sslContextParameters&amp;requestBufferSize=32768&amp;responseBufferSize=32768&amp;httpMethodRestrict=POST"
/>

            <to uri="bean:uploadFromArchiveFileProcessor?method=process" pattern="InOut"
/>

</route>

<bean id="jetty" class="org.apache.camel.component.jetty9.JettyHttpComponent9">
        <property name="endpointClass" value="org.apache.camel.component.jetty9.JettyHttpEndpoint9"
/>
        <property name="sslContextParameters" ref="sslContextParameters" />
        <property name="useContinuation" value="true" />
        <property name="requestBufferSize" value="32768" />
        <property name="responseBufferSize" value="32768" />

        <property name="threadPool">
            <bean class="org.eclipse.jetty.util.thread.QueuedThreadPool">
                <constructor-arg index="0" value="1000" />
            </bean>
        </property>

        <property name="jettyHttpBinding">
            <bean class="org.apache.camel.component.jetty.DefaultJettyHttpBinding">
                <property name="transferException" value="false" />
            </bean>
        </property>
    </bean>

When I send file to this endpoint I have out of memory with this stacktrace:

 java.lang.OutOfMemoryError: Java heap space
      at java.lang.StringCoding.decode(StringCoding.java:215)
      at java.lang.String.<init>(String.java:463)
      at java.lang.String.<init>(String.java:515)
      at org.eclipse.jetty.servlets.MultiPartFilter$Wrapper.getParameterBytesAsString(MultiPartFilter.java:390)
      at org.eclipse.jetty.servlets.MultiPartFilter$Wrapper.getParameterValues(MultiPartFilter.java:337)
      at org.apache.camel.http.common.DefaultHttpBinding.populateRequestParameters(DefaultHttpBinding.java:219)
      at org.apache.camel.http.common.DefaultHttpBinding.readHeaders(DefaultHttpBinding.java:174)
      at org.apache.camel.http.common.DefaultHttpBinding.readRequest(DefaultHttpBinding.java:110)
      at org.apache.camel.http.common.HttpMessage.<init>(HttpMessage.java:52)
      at org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:161)
      at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:74)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:200)
      at org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:43)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message