Error : Futures timed out after [20000] milliseconds when looping in scenario


I have an error when I run my simulation.
Here the context :
On my Simulation :



(x times this line …)

On Scenario4 :

val scnPic = scenario(""“Scenario 4 Pic”"")
).during(10, HOURS)

It works if :

  • List on Simulation is composed with few or less items of Scenario4 ( +/- 10 items)
  • List on Simulation is composed with many ( 20 or more ) items of Scenario4 AND if I remove the loop ( loop - during ) on Scenario4

When it fails, I got this :

Exception in thread “main” java.util.concurrent.TimeoutException: Futures timed out after [20000] milliseconds
at akka.dispatch.DefaultPromise.ready(Future.scala:870)
at akka.dispatch.DefaultPromise.result(Future.scala:874)
at akka.dispatch.Await$.result(Future.scala:74)
at com.excilys.ebi.gatling.core.structure.AbstractStructureBuilder.buildChainedActions$1(AbstractStructureBuilder.scala:184)
at com.excilys.ebi.gatling.core.structure.AbstractStructureBuilder.buildChainedActions(AbstractStructureBuilder.scala:188)
at com.excilys.ebi.gatling.core.runner.Runner$$anonfun$3.apply(Runner.scala:51)
at com.excilys.ebi.gatling.core.runner.Runner$$anonfun$3.apply(Runner.scala:49)


[ERROR] [08/02/2012 12:11:15.351] [] [akka://GatlingSystem/user/$F] error while creating actor
java.util.concurrent.TimeoutException: Futures timed out after [20000] milliseconds
at akka.dispatch.DefaultPromise.ready(Future.scala:870)
at akka.dispatch.DefaultPromise.result(Future.scala:874)


Changing the value of during doesn’t help. I try 0 with no success.

Anyone can explain me the error, and hopefully got an idea to solve it :slight_smile:

Denis V.

Hello Denis,

I’m going to have a look at this this afternoon. It seems Akka have problems instanciating many Actors from the same parent.

How many actions (requests + pause) do you have in chain_connexion, chain_0, chain_1 and chain_deconnexion, please?



2012/8/2 DeV@n <>

Also, do you think you could pass me you Simulation (with anonymized urls if you want)?

2012/8/2 Stéphane Landelle <>

Hello Stéphane,

chain_connexion : 32 requests + 25 pauses ( total pause : ~= 41 sec.)
chain_0 : 25 requests + 17 pauses ( total pause : ~= 43 sec. )
chain_1 : 11 requests + 11 pauses ( total pause : ~= 35 sec. )
chain_deconnexion : 3 requests + 3 pauses ( total pause : = 26 sec. )

I reproduce the problem with other scenario which looks like this one ( with different number of request and pause )

Thanks for your reactivity :slight_smile:

I’m looking for that :slight_smile:

I forgot to mention that I usually run Gatling in 1.2.3, but I have reproduced the problem in 1.2.5

The fastest way to make your simulation run is to increase the Akka actor creation timeout (which is, as you noticed, 20s).
What you have to do is to add an file named “application.conf” and put it into the Gatling conf folder.

You can find a template of this file in the akka-core jar.
Basically, your file should look like this:

akka {
actor {

increase from 20s to 60s

creation-timeout = 60s

However, I’d like to fix/optimize this and not only provide a workaround, so it’d be really great if you could provide your Simulation.
Your system taking more than 20s to start up is very wrong.



2012/8/2 DeV@n <>

I joined my scala files. Tell me if you need request-bodies too.

My computer is pretty fast ( Intel Core i5 CPU @ 3.30 GHz, 4 Go RAM, SSD disk ), and I think you are right when you say it’s an optimization problem. So far, some configuration running on my computer doesn’t run on a Linux VM (which is a bit slower)

I’ll try to increase the creation timeout value, and give you results (3.71 KB)

OK, I’m on it.

Just one thing, your class Scenario4 should be renamed into EspicScenario4 so that SimulationEspicT1 compiles.

I’ll keep you updated.


2012/8/2 DeV@n <>

Yes, I have renamed the scenario from EspicScenario4 to Scenario4, but I forgot this point :wink:

Could you provide the following information:

  • OS
  • JDK
  • When does the exception occur? On start-up, just after selecting the Simulation to be run, right?

2012/8/2 DeV@n <>

  • OS : Windows 7 Enterprise SP1 32 bits
  • JDK : 1.6.0_26
  • The Exception occurs after :
    “Simulation …SimulationEspicT1 started…”
    [ wait for 20 sec. ]

Exception in thread “main” [ERROR] [08/02/2012 11:57:55.150] [] [akka://GatlingSystem/user/$C] error while creating actor

Changing value of creation-timeout doesn’t help.
On the main Simulation, if I have 11 times the line “Scenario4.scnPic.configure.users(100).ramp(100*60).protocolConfig(httpConf)” on the List, my Sim works.
When it’s 12, I got the error. After that, I push the creation-timeout to 60 sec.
Infortunately, I have the same error as always, just the information about the timeout is different (so that show me the value is well changed) :
Exception in thread “main” java.util.concurrent.TimeoutException: Futures timed out after [60000] milliseconds

Hope it helps,


I fear this will be a real headache: I have no problem starting your Simulation on my Mac, except, of course, that I get some “Connection refused” as xxxxxxxxxxx is not a real host name. Launching is also almost immediate.

How do you launch Gatling? Do you use a bundle launched from the command line? an IDE? the maven plugin?

2012/8/2 DeV@n <>

I launch Gatling with Eclipse, or from the command line, with the same result.
I also try with the modified files I sent, I got the same error.

I’ll with another JVM.

Have you try to add more Scenario4 in the List ?

OK, I doubled them and was able to reproduce!
I’ll keep you updated.

2012/8/2 DeV@n <>

Just one thing: did you tune your JVM, when launching the Engine class?
Here are the options I use:


2012/8/2 Stéphane Landelle <>

No, JVM is not tuned.
I also try with JDK 1.7, same result.

Happy you reproduce the error ^^


Great news: I pinned it!

You have to possibilities:

  • build 1.3.0-SNAPSHOT from sources (tell me if you need help)
  • use a loop.times instead of a loop.during as it’s not implemented the same way
    Thanks for reporting,


2012/8/2 DeV@n <>

FYI, I just uploaded a SNAPSHOT:

2012/8/2 Stéphane Landelle <>

Great !

It now works like a charm :slight_smile:
Big thanks for your quick and efficient response !!