[ 
https://issues.apache.org/jira/browse/WAGON-518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454353#comment-16454353
 ] 

Chris Lott edited comment on WAGON-518 at 4/26/18 3:07 PM:
-----------------------------------------------------------

Finally tested for real. Used branch WAGON-518 to build version 3.1.0-SNAPSHOT, 
and with that referenced in my pom I successfully uploaded a 9.4MB file using a 
3MB Java memory limit (VM argument -Xmx3m).  Then I re-ran the same config+test 
using version 3.0.0 and it failed with a heap-space exception. So this fix has 
definitely passed my test.

When do you think you might possibly be releasing a version?


was (Author: chrislott):
Finally tested for real. Used branch WAGON-518 to build version 3.1.0-SNAPSHOT, 
and with that referenced in my pom I successfully uploaded a 9.4MB file using a 
3MB Java memory limit (VM argument -Xmx3m).  Then I backed off to version 3.0.0 
and it failed with a heap-space exception. So this fix has definitely passed my 
test.

When do you think you might possibly be releasing a version?

> AbstractHttpClientWagon#putFromStream() reads entire content to memory
> ----------------------------------------------------------------------
>
>                 Key: WAGON-518
>                 URL: https://issues.apache.org/jira/browse/WAGON-518
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-http
>    Affects Versions: 2.12
>            Reporter: Chris Lott
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.1.0
>
>
> Method putFromSteam in class AbstractHttpClientWagon seems to violate the 
> implied contract of working with streams.  It uses much memory because it 
> first consumes the input stream argument, then transfers that content.  The 
> code that consumes the stream is in the private class 
> RequestEntityImplementation ctor:
> {code:java}
>      byte[] bytes = IOUtil.toByteArray( stream );{code}
> Please revise it, if possible, to behave more like the superclass 
> StreamWagon's putFromStream method, which does the transfer straight from the 
> input stream.
> We are attempting to PUT some 150MB artifacts in a java microservice that 
> runs with rather sharp memory limits.  As a local workaround we increased the 
> JVM's -Xmx argument but that way lies madness.
> Thanks in advance for any suggestions or workarounds. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to