# Tune HTTP connection and request timeout in scenarios

**URL:** <https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154>\
**Category:** Gatling (Open-Source)\
**Created:** [October 26, 2012, 12:09pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154 "2012-10-26T12:09:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_MAURY](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jeff\_MAURY](https://community.gatling.io/u/Jeff_MAURY)\
**Post date:** [October 26, 2012, 12:09pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154/1 "2012-10-26T12:09:06Z")

</div>

Hello,

I need to change the default values for the HTTP connection and request timeout. I saw that this is possible in the gatling.conf file but do you know if this can be done directly in the scenario ?  
Thanks  
Jeff

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [October 26, 2012, 12:26pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154/2 "2012-10-26T12:26:08Z")

</div>

Hi Jeff,

No, you can’t do it in the Simulation.

The reason for this kind of tuning not being available in HttpProtocolConfiguration is because it’s scenario scoped while the Http client is a singleton.

Note that you can also override config file params with System properties (-Dgatling.http.connectionTimeout=120000).

Does this help?

Cheers,

Stéphane

2012/10/26 Jeff MAURY \<[jeffmaury@gmail.com](mailto:jeffmaury@gmail.com)\>

---

<div class="post-metadata">

**Author:** ![Anupama\_Shetty](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Anupama\_Shetty](https://community.gatling.io/u/Anupama_Shetty)\
**Post date:** [February 6, 2015, 6:45pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154/3 "2015-02-06T18:45:31Z")

</div>

Hi Jeff,

Were you able to successfully over write the timeout settings? I tried running it both by manually modifying the “gatling-charts-highcharts-2.0.0-M3a/conf/gatling.conf” file and by passing ‘-Dgatling.http.requestTimeoutInMs=300’ argument during test run but I still see the ‘Request reached idle time out of 60000 ms after 60570 ms’ message in my gatling test run.

@Stephane: Is there anything else I can do to over write the request timeout please?

Thanks,  
Anu

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [February 6, 2015, 8:13pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154/4 "2015-02-06T20:13:20Z")

</div>

You’re running a very old Gatling version. That was fixed a long time ago.

---

<div class="post-metadata">

**Author:** ![Anupama\_Shetty](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Anupama\_Shetty](https://community.gatling.io/u/Anupama_Shetty)\
**Post date:** [February 6, 2015, 8:45pm UTC](https://community.gatling.io/t/tune-http-connection-and-request-timeout-in-scenarios/154/5 "2015-02-06T20:45:15Z")

</div>

So the version I am using does not let over writing config parameters and I need to upgrade to a recent version to make this happen?

I can try a later version assuming it is backward compatible and my test code continues to function as expected.
