You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/01/31 18:26:02 UTC

[Bug 58950] New: Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

            Bug ID: 58950
           Summary: Regression in HTTP Request leading to
                    ConnectTimeoutException and bad throughpout
           Product: JMeter
           Version: Nightly (Please specify date)
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: p.mouawad@ubik-ingenierie.com

http://mail-archives.apache.org/mod_mbox/jmeter-dev/201601.mbox/%3CCAH9fUpbwMk3e8TDDbHr8xfJ_g2ktxsUz1CU8FdrondToHkoDFQ%40mail.gmail.com%3E

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Regression affecting Nightly build as of 30 jan 2016

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #5 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 33507
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33507&action=edit
Test case to reproduce the keepalive issue

The server under test is configured with a keepalive timeout of 2 seconds. The
test waits 3 seconds after each request.

This results in a Exception on the second request:
org.apache.http.NoHttpResponseException: localhost:8080 failed to respond

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] NoHttpResponseException when Pause between samplers exceeds keepalive sent by server

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|NoHttpResponseException     |NoHttpResponseException
                   |when Pause between samplers |when Pause between samplers
                   |exceed keepalive sent by    |exceeds keepalive sent by
                   |server                      |server

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |---
             Status|RESOLVED                    |REOPENED

--- Comment #12 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
This issue mentions 1 issue related to HttpClient 4.5.1 fixed in 4.5.2
See comment 5 from Felix

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #10 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Philippe Mouawad from comment #9)
> (In reply to Philippe Mouawad from comment #6)
> > Created attachment 33575 [details]
> > Test Plan that reproduces the issues with a Tomcat 8
> > 
> > Hi,
> > I have a strange issue which also occurs with 2.13 by the way.
> > 
> > Tomcat configuration:
> > 
> > apache-tomcat-8.0.30/webapps/ROOT/WEB-INF/web.xml contains:
> >   <session-config>
> > 	  <session-timeout>1</session-timeout>
> > </session-config>
> > 
> > setenv.sh in tomcat/bin contains:
> > export CATALINA_OPTS="-Xmx1024m -Xms1024m"
> > 
> > 
> > server.xml:
> >     <Connector port="8080" protocol="HTTP/1.1"
> >                connectionTimeout="20000"
> >                enableLookups="false"
> >                keepAliveTimeout="2000"
> >                minSpareThreads="25"
> >                compression="off"
> >                redirectPort="8443" />
> > 
> > 
> > 
> > When I run the test, I get a boost in CPU, then a pause (a thread dump shows
> > threads stuck:
> > java.lang.Thread.State: RUNNABLE
> > 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> > 	at
> > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
> > 	- locked <0x00000007a2804870> (a java.net.SocksSocketImpl)
> > 
> > 
> > Then after some time a new peak in CPU and then the pause....
> > 
> > 
> > JMeter config at defaults and Java options:
> > -server -Xms1024m -Xmx1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xss256k
> > -Dcom.sun.management.jmxremote.port=3333
> > -Dcom.sun.management.jmxremote.authenticate=false
> > -Dcom.sun.management.jmxremote.ssl=false  -XX:+UseThreadPriorities
> > -XX:ThreadPriorityPolicy=42  -verbose:gc -XX:+PrintGCDetails
> > -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
> > -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime
> > -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintHeapAtGC
> > -XX:+PrintGCCause  -Xloggc:/data/jmeter/verbose-3.0.log
> > -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false
> > 
> > 
> > It could be my machine TCP configuration but could somebody check on Linux
> > machine ?
> > Thanks
> 
> Hello,
> The issue was due to ephemeral ports saturation.
> After fixing my machine configuration, I was able to run the test in better
> conditions.
> On Mac OSX, I setup socket reuse time to 1s (it was 15s before) and the CPU
> drop falled down to 1s range vs 15s range before.
> 
> So this benchmark, confirms what Bug 59034 mentions regarding management of
> Connections when Parallel download is used for embedded resources.
> But there are good news with it, with 15 threads we make 138% more samples
> with 3.0 than with 2.13 thanks to fixing of Bug 57804.

I meant fixing of Bug 58099 (not Bug 57804)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #8 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
There might be an explanation to this issue related to starvation of ephemeral
ports as http request downloads embedded resources.
Having the tomcat and jmeter colocated is not great.
Parallel downloads is more aggressive than a real client in terms of ephemeral
ports usage as a new thread pool is created for each request that does not
reuse httpclient (as spotted in another issue)

- My test has no timer as it aims at comparing throughput between versions.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 33505
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33505&action=edit
Hack to enable better stale management

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 33506
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33506&action=edit
AWS Monitoring showing the difference in behaviour between versions

High metrics are for r1715087, low are for current trunk

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Philippe Mouawad from comment #6)
> Created attachment 33575 [details]
> Test Plan that reproduces the issues with a Tomcat 8
> 
> Hi,
> I have a strange issue which also occurs with 2.13 by the way.
> 
> Tomcat configuration:
> 
> apache-tomcat-8.0.30/webapps/ROOT/WEB-INF/web.xml contains:
>   <session-config>
> 	  <session-timeout>1</session-timeout>
> </session-config>
> 
> setenv.sh in tomcat/bin contains:
> export CATALINA_OPTS="-Xmx1024m -Xms1024m"
> 
> 
> server.xml:
>     <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                enableLookups="false"
>                keepAliveTimeout="2000"
>                minSpareThreads="25"
>                compression="off"
>                redirectPort="8443" />
> 
> 
> 
> When I run the test, I get a boost in CPU, then a pause (a thread dump shows
> threads stuck:
> java.lang.Thread.State: RUNNABLE
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
> 	- locked <0x00000007a2804870> (a java.net.SocksSocketImpl)
> 
> 
> Then after some time a new peak in CPU and then the pause....
> 
> 
> JMeter config at defaults and Java options:
> -server -Xms1024m -Xmx1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xss256k
> -Dcom.sun.management.jmxremote.port=3333
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false  -XX:+UseThreadPriorities
> -XX:ThreadPriorityPolicy=42  -verbose:gc -XX:+PrintGCDetails
> -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
> -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime
> -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintHeapAtGC
> -XX:+PrintGCCause  -Xloggc:/data/jmeter/verbose-3.0.log
> -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false
> 
> 
> It could be my machine TCP configuration but could somebody check on Linux
> machine ?
> Thanks

Hello,
The issue was due to ephemeral ports saturation.
After fixing my machine configuration, I was able to run the test in better
conditions.
On Mac OSX, I setup socket reuse time to 1s (it was 15s before) and the CPU
drop falled down to 1s range vs 15s range before.

So this benchmark, confirms what Bug 59034 mentions regarding management of
Connections when Parallel download is used for embedded resources.
But there are good news with it, with 15 threads we make 138% more samples with
3.0 than with 2.13 thanks to fixing of Bug 57804.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 33504
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33504&action=edit
Modified MeasuringConnectionManager

Some changes tried on KeepAlive management.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] NoHttpResponseException when Pause between samplers exceeds keepalive sent by server

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Fri Feb 26 22:35:18 2016
New Revision: 1732569

URL: http://svn.apache.org/viewvc?rev=1732569&view=rev
Log:
Upgrade to HttpClient/httpmime 4.5.2 which fixes at the same time:
- Bug 58881 - HTTP Request : HTTPHC4Impl shows exception when server uses
"deflate" compression
- Bug 58583 - HTTP client fails to close connection if server misbehaves by not
sending "connection: close", violating HTTP RFC 2616 / RFC 7230
- Bug 56358 - Cookie manager supports cross port cookies and RFC6265
- Bug 57319 - Upgrade to HttpClient 4.5.2
Bugzilla Id: 57319

Modified:
    jmeter/trunk/build.properties
    jmeter/trunk/eclipse.classpath
    jmeter/trunk/lib/   (props changed)
    jmeter/trunk/lib/aareadme.txt
    jmeter/trunk/licenses/bin/README.txt
    jmeter/trunk/res/maven/ApacheJMeter_parent.pom
   
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java
   
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
    jmeter/trunk/xdocs/changes.xml


Author: pmouawad
Date: Fri Feb 26 22:50:37 2016
New Revision: 1732574

URL: http://svn.apache.org/viewvc?rev=1732574&view=rev
Log:
Bug 58950 - NoHttpResponseException when Pause between samplers exceeds
keepalive sent by server
Bugzilla Id: 58950

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] NoHttpResponseException when Pause between samplers exceed keepalive sent by server

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Regression in HTTP Request  |NoHttpResponseException
                   |leading to                  |when Pause between samplers
                   |ConnectTimeoutException and |exceed keepalive sent by
                   |bad throughout              |server

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Regression in HTTP Request  |Regression in HTTP Request
                   |leading to                  |leading to
                   |ConnectTimeoutException and |ConnectTimeoutException and
                   |bad throughpout             |bad throughout

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 33575
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33575&action=edit
Test Plan that reproduces the issues with a Tomcat 8

Hi,
I have a strange issue which also occurs with 2.13 by the way.

Tomcat configuration:

apache-tomcat-8.0.30/webapps/ROOT/WEB-INF/web.xml contains:
  <session-config>
      <session-timeout>1</session-timeout>
</session-config>

setenv.sh in tomcat/bin contains:
export CATALINA_OPTS="-Xmx1024m -Xms1024m"


server.xml:
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               enableLookups="false"
               keepAliveTimeout="2000"
               minSpareThreads="25"
               compression="off"
               redirectPort="8443" />



When I run the test, I get a boost in CPU, then a pause (a thread dump shows
threads stuck:
java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
    - locked <0x00000007a2804870> (a java.net.SocksSocketImpl)


Then after some time a new peak in CPU and then the pause....


JMeter config at defaults and Java options:
-server -Xms1024m -Xmx1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xss256k
-Dcom.sun.management.jmxremote.port=3333
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false  -XX:+UseThreadPriorities
-XX:ThreadPriorityPolicy=42  -verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
-XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime
-XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintHeapAtGC
-XX:+PrintGCCause  -Xloggc:/data/jmeter/verbose-3.0.log
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false


It could be my machine TCP configuration but could somebody check on Linux
machine ?
Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #11 from Sebb <se...@apache.org> ---
Not a JMeter problem

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 58950] Regression in HTTP Request leading to ConnectTimeoutException and bad throughpout

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58950

--- Comment #7 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 33576
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33576&action=edit
Thread Dump during low CPU

-- 
You are receiving this mail because:
You are the assignee for the bug.