Discussion:
"Connection timed out: connect" with +600 threads
Jennifer R. Lee
2005-08-18 17:03:07 UTC
Permalink
Hi All - I am receiving the below errors on approximately 1% of the test cases when I try to run more then 600 threads(spread out over 3-6 W2K jmeter servers). I am using a ramp up time of 100. I am at a loss as to where the problem may be, the application server is Redhat linux 4, apache 2, PHP5 and Mysql 4.1. Has anyone run into this before?

Any help would be appreciated. Thanks!
Jennifer


java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:464)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:590)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:578)
at org.apache.jmeter.protocol.http.sampler.SoapSampler.sample(SoapSampler.java:146)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:281)
at java.lang.Thread.run(Unknown Source)
Michael Stover
2005-08-18 17:06:00 UTC
Permalink
The most straightforward explanation is that the web server limits the
connection pool and so requests beyond that limit have to wait for a
free server-side socket. If the server is getting overloaded, some
percentage of these will not be accepted before timing out on the client
side.

If your server's cpu and memory are not pinged, you might be able to
rectify by expanding the number of connections allowed in the server's
connection pool - most are configurable in this.

Other things you can try: Play with the keep-alive option on the
samplers. Try the HTTPClient HTTP Request. Do some connection
profiling on the server side.

-Mike
Post by Jennifer R. Lee
Hi All - I am receiving the below errors on approximately 1% of the test cases when I try to run more then 600 threads(spread out over 3-6 W2K jmeter servers). I am using a ramp up time of 100. I am at a loss as to where the problem may be, the application server is Redhat linux 4, apache 2, PHP5 and Mysql 4.1. Has anyone run into this before?
Any help would be appreciated. Thanks!
Jennifer
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:464)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:590)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:578)
at org.apache.jmeter.protocol.http.sampler.SoapSampler.sample(SoapSampler.java:146)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:281)
at java.lang.Thread.run(Unknown Source)
---------------------------------------------------------------------
Loading...