Futures time out [5 seconds]

1,825 views
Skip to first unread message

Roy van der Valk

unread,
Nov 7, 2013, 9:45:02 AM11/7/13
to gat...@googlegroups.com
Hi all,

I get the following error when I try to run my simulations (2.0.0-M3a).

Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
        at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:96)
        at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:100)
        at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
        at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
        at scala.concurrent.Await$.result(package.scala:107)
        at io.gatling.core

I get it rights after I started the simulation, before I see any intermediary results.

The scenario is rather straight forward. It's for filling up the database with test data (so one admin user with a lot of calls, use of repeat and asLongAs blocks, and some feeders). When I reduce the size of the scenario it does work. Besides I try to run it from a Linux server environment, if I run it locally it also works.

Anybody knows what causes this? And how I can fix it? Can I increase the timeout?

Seems pretty similar to this post, but increasing the timeout in this way doesn't work (probably because of the newer Gatling version) and I think it is causes by something else.

Thanks in advance,
Roy

Roy van der Valk

unread,
Nov 7, 2013, 9:46:29 AM11/7/13
to gat...@googlegroups.com

Roy van der Valk

unread,
Nov 7, 2013, 10:42:44 AM11/7/13
to gat...@googlegroups.com
I tried increasing the configuration.core.timeOut.actor property in the gatling.conf file, but still got the same error message with the 5 seconds, so this probably this is not the specific timeout from the error message.

Stéphane Landelle

unread,
Nov 7, 2013, 3:01:05 PM11/7/13
to gat...@googlegroups.com
Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
        at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:96)
        at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:100)
        at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
        at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
        at scala.concurrent.Await$.result(package.scala:107)
        at io.gatling.core

Arg, you cut it just when it was about to get interesting!!!
Could I get the full stack trace, please?


2013/11/7 Roy van der Valk <roy.van....@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.

Roy van der Valk

unread,
Nov 9, 2013, 11:06:55 AM11/9/13
to gat...@googlegroups.com
Arg, so stupid I didn't notice, sorry, not in office for a couple of days (work part-time) and can't reach the server from home, but I will get it to you in a couple of days.

Borémi Toch

unread,
Mar 13, 2014, 9:34:31 AM3/13/14
to gat...@googlegroups.com
Hello,

I was able to get the same error with gatling 2.0.0-M3a: 

GATLING_HOME is set to /home/ec2-user/perfs/gatling-charts-highcharts-2.0.0-M3a

Choose a simulation number:

    [0] advanced.AdvancedExampleSimulation

    [1] basic.BasicExampleSimulation

1

Select simulation id (default is 'basicexamplesimulation'). Accepted characters are a-z, A-Z, 0-9, - and _


Select run description (optional)

test10M

Simulation basic.BasicExampleSimulation started...

Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]

       at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:96)

       at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:100)

       at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)

       at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)

       at scala.concurrent.Await$.result(package.scala:107)

       at io.gatling.core.runner.Runner.run(Runner.scala:61)

       at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:188)

       at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:180)

       at scala.Option.getOrElse(Option.scala:120)

       at io.gatling.app.Gatling.start(Gatling.scala:180)

       at io.gatling.app.Gatling$.fromMap(Gatling.scala:59)

       at io.gatling.app.Gatling$.runGatling(Gatling.scala:80)

       at io.gatling.app.Gatling$.main(Gatling.scala:54)

       at io.gatling.app.Gatling.main(Gatling.scala)


Here's the important part of my scenario. If I remember well, I don't have the error if I comment the pause, I can check if you want to :

 val createThenRead = scenario("create then read")

   .feed(personFeeder.circular)

   .feed(randomExternalIdFeeder)

   .repeat(20000) {

   exec(

     http("create request")

       .post("/requests/create")

       .body(StringBody("""{

               "externalId": "${request_ext_id}",

               "accountId": "${accountId}",

               "personLabel": "${personLabel}",

               "refId": "refId_1",

               "nature": "nature_1",

               "personType": "personType_1",

               "advisorId": "advisorId_1",

               "operator": "operator_1",

               "status": "status_1",

               "comment": "comment_1",

               "createUserId": "createUserId_1",

               "updateUserId": "updateUserId_1",

               "theme": "theme_1",

               "topic": "topic_1",

               "subTopic": "subTopic_1",

               "contractId": "contractId_1",

               "hardwareId": "hardwareId_1",

               "result": "result_1",

               "incidentId": "incidentId_1",

               "multiSession": false,

               "argument": "argument_1",

               "resultArgument": "resultArgument_1",

               "offerProposed": ["offer_1", "offer_2"],

               "offerAccepted": ["offer_1","offer_2"]

           }"""))

       .headers(headers_1)

       .check(status.is(200))

       .check(regex(""""returnCode"\s*:\s*0"""))

       .check(regex(""""externalId"\s*:\s*"(\w+)""""))

       .check(regex(""""NORMAL""""))


   )

   .pause(10 milliseconds, 20 milliseconds)

   }

)


 setUp(createThenRead.inject(ramp(500 users) over (30 seconds)))

               .protocols(httpProtocol)


Stéphane Landelle

unread,
Mar 13, 2014, 9:35:50 AM3/13/14
to gat...@googlegroups.com
Can you reproduce with latest snapshot?


For more options, visit https://groups.google.com/d/optout.

Borémi Toch

unread,
Mar 14, 2014, 10:32:23 AM3/14/14
to gat...@googlegroups.com
I'll check and get back to you.

Maxime Laudren

unread,
Jun 3, 2014, 9:25:18 AM6/3/14
to gat...@googlegroups.com
Hi,

I have the same issue, but the odd thing is I get it on a remote server (windows server 2012) and not on my computer (windows 8.1).

Both use the version 2.0.0M3a, and JDK8.5 x64.

Gatling was working until i moved simulation file to a sub-folder and specify the result folder.
If i copy/past the complet gatling folder from my computer to the server, same issue.

I tryed with the snapshot, but my scenrio is not working (got lot of errors), and i have a warning that the proxy settings in the galting.conf file are removed (i'm behind a proxy and must specify it to get my scenarii works)

here is the stack;
C:\Users\max\Documents\gatling\bin>call gatling.bat -s customer.proj1.qualif.Start_full -rf C:\inetpub\Gatling\proj1\qualif  1>../logs/qualif/Start_full.log
Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
        at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:96)
        at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:100)
        at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
        at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
        at scala.concurrent.Await$.result(package.scala:107)
        at io.gatling.core.runner.Runner.run(Runner.scala:61)
        at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:188)
        at io.gatling.app.Gatling$$anonfun$18.apply(Gatling.scala:180)
        at scala.Option.getOrElse(Option.scala:120)
        at io.gatling.app.Gatling.start(Gatling.scala:180)
        at io.gatling.app.Gatling$.fromMap(Gatling.scala:59)
        at io.gatling.app.Gatling$.runGatling(Gatling.scala:80)
        at io.gatling.app.Gatling$.main(Gatling.scala:54)
        at io.gatling.app.Gatling.main(Gatling.scala)

My scenario is only for monitoring server content availability. So it does many 'get' on many resources.

Any idea about what i'm doing wrong?

Max

Stéphane Landelle

unread,
Jun 3, 2014, 9:43:46 AM6/3/14
to gat...@googlegroups.com
I'll answer the same way: could you try the latest snapshot, please? :)

Maxime Laudren

unread,
Jun 3, 2014, 9:57:53 AM6/3/14
to gat...@googlegroups.com
I tryed but my scenari does not work, I get lots of errors when i try to run it.

Take a look:
PS C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\bin> .\gatling.bat
GATLING_HOME is set to "C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT"
15:51:27.296 [WARN ] i.g.c.c.GatlingConfiguration$ - Beware, property gatling.http.proxy.host is still defined but it was removed
15:51:27.299 [WARN ] i.g.c.c.GatlingConfiguration$ - Beware, property gatling.http.proxy.port is still defined but it was removed
15:51:27.300 [WARN ] i.g.c.c.GatlingConfiguration$ - Beware, property gatling.http.cache is still defined but it was removed
15:51:31.158 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:7: object Headers is not a member of package io.gatling.http
15:51:31.165 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Names._
15:51:31.167 [ERROR] i.g.a.ZincCompiler$ -                        ^
15:51:31.171 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:8: object Headers is not a member of package io.gatling.http
15:51:31.172 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Values._
15:51:31.172 [ERROR] i.g.a.ZincCompiler$ -                        ^
15:51:31.189 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:10: not found: object bootstrap
15:51:31.189 [ERROR] i.g.a.ZincCompiler$ - import bootstrap._
15:51:31.189 [ERROR] i.g.a.ZincCompiler$ -        ^
15:51:31.191 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:11: not found: object assertions
15:51:31.192 [ERROR] i.g.a.ZincCompiler$ - import assertions._
15:51:31.192 [ERROR] i.g.a.ZincCompiler$ -        ^
15:51:33.080 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:46: not found: value atOnce
15:51:33.081 [ERROR] i.g.a.ZincCompiler$ -      setUp(scn.inject(atOnce(1 user))).protocols(httpProtocol)
15:51:33.082 [ERROR] i.g.a.ZincCompiler$ -                       ^
15:51:33.106 [ERROR] i.g.a.ZincCompiler$ - 5 errors found
Compilation failed


Here is my scenario:

package customer.proj1

import io.gatling.core.Predef._
import io.gatling.core.session.Expression
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import io.gatling.http.Headers.Values._
import scala.concurrent.duration._
import bootstrap._
import assertions._

class Search_ref16750 extends Simulation {

val httpProtocol = http
.acceptHeader("image/webp,*/*;q=0.8")
.acceptEncodingHeader("gzip,deflate,sdch")
.connection("keep-alive")
.doNotTrackHeader("1")
.userAgentHeader("Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1894.0 Safari/537.36")

val headers_1 = Map(
"""Accept""" -> """application/json, text/javascript, */*; q=0.01""",
"""X-Requested-With""" -> """XMLHttpRequest""")

val headers_2 = Map(
"""Accept""" -> """image/webp,*/*;q=0.8""",
"""If-Modified-Since""" -> """1358160327097""",
"""If-None-Match""" -> """H511610.GIF_2704_1358160327097""",
"""Proxy-Connection""" -> """keep-alive""")

val scn = scenario("Get Product Details")
.repeat(6) {
exec(http("GetProductDetails")
.headers(headers_1)
.check(status.is(200)))
.exec(http("GetProductImage")
.headers(headers_2)
.check(status.is(200), bodyString.exists))
.pause(10 seconds)
}

setUp(scn.inject(atOnce(1 user))).protocols(httpProtocol)
}

Do I need to copy libs from M3a version to snapshot?

Stéphane Landelle

unread,
Jun 3, 2014, 10:00:50 AM6/3/14
to gat...@googlegroups.com

Maxime Laudren

unread,
Jun 3, 2014, 10:30:20 AM6/3/14
to gat...@googlegroups.com
Still get 1 error after fixing my scenario:

16:25:49.817 [ERROR] i.g.a.ZincCompiler$ - C:\Users\Maxime\Documents\Dev\gatling\2.0.0-SNAPSHOT\user-files\simulations\customer\proj1\Search_ref16750.scala:44: not found: value atOnce
16:25:49.825 [ERROR] i.g.a.ZincCompiler$ -      setUp(scn.inject(atOnce(1 user))).protocols(httpProtocol)
16:25:49.827 [ERROR] i.g.a.ZincCompiler$ -                       ^
16:25:49.850 [ERROR] i.g.a.ZincCompiler$ - one error found

Didn't find anything about this
<div class="HOEnZb
...

Stéphane Landelle

unread,
Jun 3, 2014, 10:32:35 AM6/3/14
to gat...@googlegroups.com
Just like ramp that became rampUsers, atOnce became atOnceUsers

Maxime Laudren

unread,
Jun 4, 2014, 5:04:41 AM6/4/14
to gat...@googlegroups.com
Ok, i missed that. thought it was only for the two listed, and not all user's injections methods.

So, my scenario is running on both my computer and the remote server
Still got the proxy warning but that's another story.

Any clue of origin of the error? To know if I, and other, have to use the snapshot or the M3a for futur needs.

Thanks for the help!

Stéphane Landelle

unread,
Jun 4, 2014, 5:13:43 AM6/4/14
to gat...@googlegroups.com
Honestly, I don't remember, and don't have time to dig in the history, sorry.
Reply all
Reply to author
Forward
0 new messages