Bug 60731 - OOM on BackendListener with TIME box mode in nightly before 3.2 Valentine version
Summary: OOM on BackendListener with TIME box mode in nightly before 3.2 Valentine ver...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-14 10:44 UTC by mchassagneux
Modified: 2017-02-16 14:28 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mchassagneux 2017-02-14 10:44:44 UTC
The BackendListener stock all datas in a DescriptiveStatistics metrics (okResponsesStats, koResponsesStats, allResponsesStats ). 
With the TIME box mode (i.e backend_metrics_window_mode=timed ), these datas are reset on each interval of time ( default 5 sec for influxdb )
But when the load is heavy, we could stock a lot of datas during this interval of time which can lead to a OutOfMemoryError.

Example : 
2017/02/13 19:36:11 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.OutOfMemoryError: Java heap space
	at org.apache.commons.math3.util.ResizableDoubleArray.expand(ResizableDoubleArray.java:697)
	at org.apache.commons.math3.util.ResizableDoubleArray.addElement(ResizableDoubleArray.java:442)
	at org.apache.commons.math3.stat.descriptive.DescriptiveStatistics.addValue(DescriptiveStatistics.java:171)
	at org.apache.jmeter.visualizers.backend.SamplerMetric.add(SamplerMetric.java:99)
	at org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient.handleSampleResults(InfluxdbBackendListenerClient.java:258)
	at org.apache.jmeter.visualizers.backend.BackendListener.sendToListener(BackendListener.java:270)
	at org.apache.jmeter.visualizers.backend.BackendListener$Worker.run(BackendListener.java:242)

2017/02/14 01:05:20 ERROR - jmeter.visualizers.backend.influxdb.HttpMetricsSender: failed to send data to influxDB server : null 

To counter this, even in time box mode, we have to put a default sliding size.
Comment 1 Vladimir Sitnikov 2017-02-14 11:35:46 UTC
Should we probably migrate to https://github.com/HdrHistogram/HdrHistogram ?
Comment 2 Philippe Mouawad 2017-02-14 20:11:25 UTC
Author: pmouawad
Date: Tue Feb 14 20:11:09 2017
New Revision: 1783019

URL: http://svn.apache.org/viewvc?rev=1783019&view=rev
Log:
Bug 60731 - OOM on BackendListener with TIME box mode
Bugzilla Id: 60731

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java
Comment 3 Philippe Mouawad 2017-02-14 20:13:17 UTC
(In reply to Vladimir Sitnikov from comment #1)
> Should we probably migrate to https://github.com/HdrHistogram/HdrHistogram ?

+1 but not sure it can fit before 3.2
Comment 4 Philippe Mouawad 2017-02-15 07:28:02 UTC
(In reply to Philippe Mouawad from comment #2)
> Author: pmouawad
> Date: Tue Feb 14 20:11:09 2017
> New Revision: 1783019
> 
> URL: http://svn.apache.org/viewvc?rev=1783019&view=rev
> Log:
> Bug 60731 - OOM on BackendListener with TIME box mode
> Bugzilla Id: 60731
> 
> Modified:
>    
> jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/
> SamplerMetric.java

Author: pmouawad
Date: Tue Feb 14 20:48:52 2017
New Revision: 1783027

URL: http://svn.apache.org/viewvc?rev=1783027&view=rev
Log:
Bug 60731 - OOM on BackendListener with TIME box mode
Bugzilla Id: 60731

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/xdocs/usermanual/properties_reference.xml
Comment 5 Philippe Mouawad 2017-02-15 07:28:22 UTC
Hi Maxime,
Could you test last nightly build ?
Thanks
Comment 6 Philippe Mouawad 2017-02-16 14:17:46 UTC
Hi Maxime,
Did you have a chance to test if issue is fixed ?

Thanks
Comment 7 mchassagneux 2017-02-16 14:28:59 UTC
Hi, 

The run is still ongoing (for 6H) and no issue so far ! so yes for me it's OK.