Cannot assign requested address ...

Hi,
thx for this GREAT job :slight_smile:

I think i want too much but perhaps you can tell me

I’m using Gatling to test a JavaEE 6 app.

I just have 2 http request in each scenario and i have this that works very fine :

val scnConf = scn.configure users 100000 ramp 300 protocolConfig httpConf
val scnConf2 = scn2.configure users 100000 ramp 300 protocolConfig httpConf
val scnConf3 = scn3.configure users 100000 ramp 300 protocolConfig httpConf

But when i try to do the same with 200 000 in each :

  • i’ve got this message in logs : KO Cannot assign requested address to http:…
  • i’ve got exceptions in console :

akka:event-driven:dispatcher:global-2][ERROR] c.e.e.g.h.a.GatlingAsyncHandler - class java.net.ConnectException
com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:100)
org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:148)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:985)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:813)
com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:499)
com.excilys.ebi.gatling.http.action.HttpRequestAction.execute(HttpRequestAction.scala:87)
com.excilys.ebi.gatling.core.action.Action$$ProxiedByAWDelegation$$1328610019694.aw$original$AW$execute$AW$com_excilys_ebi_gatling_core_action_Action$$ProxiedByAWDelegation$$1328610019694(Unknown Source)
com.excilys.ebi.gatling.core.action.Action$$ProxiedByAWDelegation$$1328610019694_1__1260859216_258301007___AW_JoinPoint.proceed(Unknown Source)
akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:218)
scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216)
scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:215)
akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:213)
akka.actor.Actor$class.apply(Actor.scala:545)
akka.actor.TypedActor.apply(TypedActor.scala:114)
akka.actor.LocalActorRef.invoke(ActorRef.scala:910)
akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25)
akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223)
akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123)
akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:195)
akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192)

How can i increase my requests/s ?

  • Tweaking the JAVA_OPTS in gatling.sh ?
  • copy/past scenarios and let 100 000 in each ?
  • Other solution ? :slight_smile:

Thx

Hi,

Thanks!

Wow, first time seeing this one?!

I’m not a system guy, so I hope say something foolish.

I don’t think your problem comes from Gatling.
If your server under test was overloaded, you’d probably get “Connection refused” exceptions.
The “Cannot assign requested address to http” message makes me think you’re hitting your OS limits and it cannot establish the socket.

If you’re running on X-something, can you check your ulimit -n?

If everything’s fine there, I’m afraid you’d have to launch multiple Gatling instances from multiple machines.
We don’t have a cluster mode yet. This is something we plan to do, but it won’t be done before several months… You can do it manually, but your instances won’t be synchronized and if your want to consolidate the reports, you have to manually merge the simulation.log files of each node and then generate the reports with the -ro option.

Hope it help…

Steph

2012/2/3 usul <fdussert@gmail.com>

I just perform a test with 150K for each and all is fine.

My ulimit -n is 65535 and i’ve set the same for the nbproc in the limits.conf, i’ll try to increase it and test.

Thx

(and happy to see such an awesome tool made by french guys :wink: )

2012/2/3 usul <fdussert@gmail.com>

I just perform a test with 150K for each and all is fine.

My ulimit -n is 65535 and i’ve set the same for the nbproc in the limits.conf, i’ll try to increase it and test.

OK, please let us know the outcome.
This kind of question will probably come back and we’d better document it in the FAQ.

Thx

(and happy to see such an awesome tool made by french guys :wink: )

Well, the actual rock stars are the guys from Scala, Akka, Netty, AHC and Highsoft. We humbly do our best to put it all together. 328.png
But thanks!

Just upgrade in limits.conf to

fdussert soft nofile 165535
fdussert hard nofile 165535

fdussert soft nproc 165535
fdussert hard nproc 165535

was 65535 before

And there’s errors.
Perhaps a Netty limit ?

Did you try to increase the ephemeral port range?
sysctl net.inet.ip.portrange.first

http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html

2012/2/3 usul <fdussert@gmail.com>

Hi !

I’m thinking it could be AHC configuration but I don’t know which part exactly. We didn’t provide deep configuration options for AHC, maybe it’s time to re-think about it :slight_smile:

the solution might be adding an option in:

https://github.com/excilys/gatling/blob/master/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/action/HttpRequestAction.scala

I’m currently not able to do the tests, I post my suggestion in case it can help! :slight_smile:

Cheers,
BluePyth

cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000

But i can test with 49152 65535

My 2 cents : the problem is OS related and not directly related to Gatling. It seems to me we don’t bridle anything in the Netty, AHC config.

2012/2/3 Romain Sertelon <bluepyth@gmail.com>

Ok, i’ll take a look at OS related and other stuff too :wink:
Cheers

We’ll try to run some very heavy load tests after the 1.1 release, but our hands are pretty full right now, sorry…

2012/2/3 usul <fdussert@gmail.com>

There’s no problem;)
I know I want a big load, and I also know that JMeter would be dead long ago with my tests, even with the injectors …

That’s one of the reasons why we developed Gatling. :wink:

2012/2/3 usul <fdussert@gmail.com>