[Gatling 1.5.2] : Connection refused

2,853 views
Skip to first unread message

ajay vasudevan

unread,
Oct 30, 2013, 10:44:14 AM10/30/13
to gat...@googlegroups.com
Dear Gatlers,

Was a bit disappointed by the way Gatling responded to my stress test for one of my play applications.

The test bombed with "java.net.ConnectException: Connection refused" where as my play netty server was keeping good health.

My lap configurations are as follows: 
OS :         Windows 7  Enterprise 32-bit
Processor : Intel Core i5 @ 2.5 Ghz 
Core # :         2
Thread # by each core : 4
Memory:         4gb ( 3.42 gb usable)

My Fetch.scala are as follows: 

***

val httpConf = httpConfig
.acceptCharsetHeader("ISO-8859-1,utf-8;q=0.7,*;q=0.7")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3")
.disableFollowRedirect
.disableCaching

val scn = scenario("Scenario name")
.exec(http("FetchPerformance")
.get("/d")
.check(status.is(200)))

setUp(scn.users(10000).ramp(1).protocolConfig(httpConf))

***


I use the default akka configurations that comes with Gatling 1.5.2

My gatling console spits out the following messages :

19:58:50.380 [WARN ] c.e.e.g.h.a.GatlingAsyncHandler - Request 'FetchContactPerformance' failed
java.net.ConnectException: Connection refused: no further information: localhost/127.0.0.1:9000
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_09]
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) ~[na:1.7.0_09]
        at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) [netty-3.6.6.Final.jar:na]
Wrapped by: java.net.ConnectException: Connection refused: no further information: localhost/127.0.0.1:9000 to http://localhost:9000/a/b/c/d
        at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103) ~[async-http-client-1.7.18.20130621.jar:na]
        at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:418) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:380) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:109) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.6.6.Final.jar:na]
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.6.6.Final.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_09]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09]

Can anyone help me out to resolve this issue ??

Cheers,
Ajay

Stéphane Landelle

unread,
Oct 30, 2013, 10:56:58 AM10/30/13
to gat...@googlegroups.com
Well...

First, being disappointed that dealing with 10.000 concurrent connections, opened in 1 second, with both the client and the server on localhost is a bit harsh, don't you think?
Then, "Connection refused" means exactly what it states: that the server (Play) couldn't keep up with the client (Gatling).
Finally, note that both Play and Gatling use the same underlying NIO engine (Netty 3).

Stéphane


2013/10/30 ajay vasudevan <vasudev...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Floris Kraak

unread,
Oct 30, 2013, 12:15:20 PM10/30/13
to gat...@googlegroups.com

That's not a stress test, that's a spike test ;-)
If you really want to learn something about when this starts failing .. ramp up gradually.

I think someone needs to read a few things from our standard performance testing library .. like:

http://queue.acm.org/detail.cfm?id=1854041
http://queue.acm.org/detail.cfm?id=2413037

:)

--
REALITY.SYS corrupted. Reboot Universe? (Y/N/Q)

Stefan Magnus Landrø

unread,
Oct 31, 2013, 4:52:05 AM10/31/13
to gat...@googlegroups.com
Totally agree with Stéphane - establishing 10.000 connections in 1 second is rough stuff for a windows machine - a device like f5 bigip would probably handle this better.

If you use gatling 2 instead, you can try a 

rampRate(10 usersPerSec) to(10000 usersPerSec) during(10 minutes)
instead (the api looks a little bit different on master)


Stefan

Stefan Magnus Landrø

unread,
Oct 31, 2013, 4:53:19 AM10/31/13
to gat...@googlegroups.com
No errors in play log at all - stuff like running out of sockets or something?
Reply all
Reply to author
Forward
0 new messages