Bug 60928 - Http Request : Connection Leak when keepalive is used with Embedded Resources
Summary: Http Request : Connection Leak when keepalive is used with Embedded Resources
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.9
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-28 10:11 UTC by Philippe Mouawad
Modified: 2017-03-28 11:30 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2017-03-28 10:11:18 UTC
Doing a load test with embedded resources I faced the following issue:

    I have a GET (https://www.foo.com/fragment/ajax/get/identifier/dynamic/) that returns JSON with wrong Content Type (text/html instead of json)
    HTML Parser parses the response that contains escaped html inside JSON so it succeeds extracting links and builds 2 links:
        https://www.foo.com/fragment/ajax/get/identifier/dynamic/%5C%22https:%5C/%5C/www.foo.com%5C/mediap%5C/62%5C/6%5C/3%5C/a%5C/9%5C/10110954_fo_01_web.jpg%5C%22
        https://www.foo.com/fragment/ajax/get/identifier/dynamic/%5C%22https:%5C/%5C/www.foo.com%5C/mediap%5C/62%5C/c%5C/4%5C/9%5C/d%5C/10361071_fo_01_web.jpg%5C%22
    Response to this new request will return the same response so we end up being recursive

Now here is the problem:

    For some recursive processing I end up having this which seems ok:
        java.lang.Exception: Maximum frame/iframe nesting depth exceeded.
    But for some of the requests I end up having :
        Response message: Non HTTP response message: Timeout waiting for connection from pool
        Meaning the Http4 pool has reached the max number of connections, its size is set to the value of "Parallel downloads. Number" which is 6


I have another case, where I have 1 page that returns 1 html page with many links.
The 10th link download also fails with "Timeout waiting for connection from pool".
Comment 1 Philippe Mouawad 2017-03-28 10:15:15 UTC
Author: pmouawad
Date: Tue Mar 28 10:14:49 2017
New Revision: 1789082

URL: http://svn.apache.org/viewvc?rev=1789082&view=rev
Log:
Bug 60928 - Http Request : Connection Leak when keepalive is used with Embedded Resources
Bugzilla Id: 60928

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2017-03-28 11:30:44 UTC
Author: pmouawad
Date: Tue Mar 28 11:30:13 2017
New Revision: 1789097

URL: http://svn.apache.org/viewvc?rev=1789097&view=rev
Log:
Fix code smell

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java