Bug 58852 - Memory consumption when sending large files with method PUT
Summary: Memory consumption when sending large files with method PUT
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
: 47660 (view as bug list)
Depends on:
Reported: 2016-01-13 20:55 UTC by Felix Schumacher
Modified: 2016-02-27 08:38 UTC (History)
2 users (show)

Use less memory when using large files on PUT method (2.78 KB, patch)
2016-01-13 20:55 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schumacher 2016-01-13 20:55:41 UTC
Created attachment 33435 [details]
Use less memory when using large files on PUT method

When sending large files with PUT method, at HTTPHC4Impl and HTTPHC3Implwill store the entire content in the sampler. This will lead to OutOfMemory errors rather quickly.

As in POST method, we should store a short message in the sampler, to reduce the amount of memory needed.
Comment 1 Felix Schumacher 2016-01-16 15:23:42 UTC
Date: Sat Jan 16 15:23:12 2016
New Revision: 1724996

URL: http://svn.apache.org/viewvc?rev=1724996&view=rev
Use less memory for PUT requests.

Bugzilla Id: 58852

Comment 2 Ahmad 2016-02-12 00:20:31 UTC
Hi Felix
I tested the fix with 1GB * 10 users and 4GB heap and that worked with no issues.

I tested the fix with 5GB * 10 users and got OOM exception ((with 4GB heap as well).  

is there a way to improve the fix to allow for larger Object sizes and higher concurrency?? 

Is there a formula to increase the heap size (taking into account object sizes and concurrent users?)>??

Comment 3 Felix Schumacher 2016-02-12 18:03:55 UTC
How big is the response to your PUT requests? (See "Save response as MD5 hash?" in http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request)

I have tested upload with POST and PUT with 10G each without any problems.
Comment 4 Philippe Mouawad 2016-02-20 00:01:33 UTC
Hi Felix,
Can this one be closed ?
Comment 5 Philippe Mouawad 2016-02-26 21:28:50 UTC
*** Bug 47660 has been marked as a duplicate of this bug. ***
Comment 6 Philippe Mouawad 2016-02-27 08:38:03 UTC
As per last answer on this discussion:

I am closing issue as fixed
Comment 7 The ASF infrastructure team 2022-09-24 20:38:02 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3777