Futures time out [5 seconds]

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

Didn’t provide the link to the similar post https://groups.google.com/forum/#!msg/gatling/deQhTEO-NFE/uoW-hxgHMJwJ

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.

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?

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.

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)

Can you reproduce with latest snapshot?

I’ll check and get back to you.

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

I’ll answer the same way: could you try the latest snapshot, please? :slight_smile:

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
.baseURL(“http://download.internalserver.com/”)
.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”)
.get(""“http://localhost/api/product/details?commercialRef=16750&country=FR&lang=fr_z003"”")
.headers(headers_1)
.check(status.is(200)))
.exec(http(“GetProductImage”)
.get(""“http://download.internalserver.com/files?p_Doc_Oid=30266123&p_File_Ext=.GIF”"")
.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?

https://github.com/excilys/gatling/wiki/Gatling%202#snapshot

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

Just like ramp that became rampUsers, atOnce became atOnceUsers

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!

Honestly, I don’t remember, and don’t have time to dig in the history, sorry.