excilys/gatling — Issue #382: TimeoutException
Author: pyricau
Created: 2012-01-29 23:07:11+00:00
State: open

Noob Mode: ON again !

I have a simple scenario running. It runs well with the following configuration :

```
val scnConf = scn.configure users 10 ramp 10 protocolConfig httpConf
```

I tried something a bit bigger, based on the documentation :
```
val scnConf = scn.configure users 1000 ramp 100 protocolConfig httpConf
```

I'm getting the following stacktrace something like a thousand times :

```
23:59:00.810 [AsyncHttpClient-Reaper][ERROR] c.e.e.g.h.a.GatlingAsyncHandler - class java.util.concurrent.TimeoutException
com.ning.http.client.providers.netty.NettyAsyncHttpProvider$ReaperFuture.run(NettyAsyncHttpProvider.java:2009)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:680)
```

In the end, it ends well :

```
Simulation Finished. Generating Reports...
Reports Generated. All done.
```

My scenario :

```
val urlBase = "http://voxe.org"

val httpConf = httpConfig.baseURL(urlBase)

val headers_1 = Map(
"Accept" -> """text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_2 = Map(
"Accept" -> """text/css,*/*;q=0.1""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_3 = Map(
"Accept" -> """image/png,image/*;q=0.8,*/*;q=0.5""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_4 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/"""
)

val headers_5 = Map(
"Accept" -> """*/*""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_6 = Map(
"Accept" -> """*/*""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Cache-Control" -> """max-age=0""",
"Host" -> """www.google-analytics.com""",
"If-Modified-Since" -> """Tue, 08 Nov 2011 01:02:28 GMT""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_7 = Map(
"Accept" -> """image/png,image/*;q=0.8,*/*;q=0.5""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """www.google-analytics.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_8 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val headers_33 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/france-presidentielle-2007"""
)

val headers_45 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/france-presidentielle-2007""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val headers_46 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/france-presidentielle-2007/francois-bayrou,olivier-besancenot/environnement-et-agriculture"""
)

val headers_48 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/france-presidentielle-2007/francois-bayrou,olivier-besancenot/environnement-et-agriculture""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val scn = scenario("Scenario name")
.exec(
http("request_1")
.get("/")
.headers(headers_1)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_8")
.get("/api/v1/elections/search")
.headers(headers_8)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_45")
.get("/api/v1/elections/4ef479f8bc60fb0004000001")
.queryParam("tags", "all")
.headers(headers_45)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_48")
.get("/api/v1/propositions/search")
.queryParam("electionIds", "4ef479f8bc60fb0004000001")
.queryParam("tagIds", "4ef479fabc60fb00040000ec")
.queryParam("candidacyIds", "4ef479fdbc60fb000400026f,4ef479fdbc60fb0004000273")
.headers(headers_48)
)

val scnConf = scn.configure users 1000 ramp 100 protocolConfig httpConf
runSimulation(scnConf)
```

The graphics show a lot of requests in error :)