# ConnectException: connection timed out: computer-database.gatling.io/35.158.229.206:80

**URL:** <https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995>\
**Category:** Gatling (Open-Source)\
**Created:** [October 17, 2017, 11:57am UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995 "2017-10-17T11:57:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Tunick](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@Alexander\_Tunick](https://community.gatling.io/u/Alexander_Tunick)\
**Post date:** [October 17, 2017, 11:57am UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/1 "2017-10-17T11:57:03Z")

</div>

Hello guys. I’m new in gatling and now experimenting with Gatling on its website **[computer-database.gatling.io](http://computer-database.gatling.io).**

Everything is working fine and i’m going to apply load test for my project at work in few days, but one problem,  
I need 2000 users/per second for my website (it seems not a big deal for gatling as I read on other recourses)

I have this simple code: where I want to load 250 users/admins during 300 seconds, and now issues and questions (Please, help me figure this out)  
When I’ve started this script:  
`

package load

import io.gatling.core.Predef.\_  
import io.gatling.http.Predef.\_  
import io.gatling.core.structure.ChainBuilder  
import io.gatling.jdbc.Predef.jdbcFeeder  
import scala.util.Random  
import scala.concurrent.duration.\_

class TestOvo extends Simulation {

val httpProtocol = http  
.baseURL(“[http://computer-database.gatling.io](http://computer-database.gatling.io)”)  
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,_/_;q=0.8”)  
.acceptEncodingHeader(“gzip, deflate”)  
.acceptLanguageHeader(“en-US,en;q=0.8”)  
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_12\_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36”)

val headers\_0 = Map(“Upgrade-Insecure-Requests” → “1”)

val headers\_10 = Map(  
“Origin” → “[http://computer-database.gatling.io](http://computer-database.gatling.io)”,  
“Upgrade-Insecure-Requests” → “1”)

object Search {  
val search = exec(http(“request\_0”)  
.get("/")  
.headers(headers\_0))  
.pause(1)  
.exec(http(“request\_1”)  
.get("/computers?f=macbook")  
.headers(headers\_0))  
.pause(2)  
.exec(http(“request\_2”)  
.get("/computers/89")  
.headers(headers\_0))  
.pause(2)  
.exec(http(“request\_3”)  
.get("/")  
.headers(headers\_0))  
.pause(2)  
}  
object Browse {  
val browse = exec(http(“request\_4”)  
.get("/computers?p=1")  
.headers(headers\_0))  
.pause(1)  
.exec(http(“request\_5”)  
.get("/computers?p=2")  
.headers(headers\_0))  
.pause(1)  
.exec(http(“request\_6”)  
.get("/computers?p=3")  
.headers(headers\_0))  
.pause(2)  
.exec(http(“request\_7”)  
.get("/computers?p=4")  
.headers(headers\_0)  
.resources(http(“request\_8”)  
.get("/computers?p=5")  
.headers(headers\_0)))  
.pause(1)  
}

object Edit {  
val edit = exec(http(“request\_9”)  
.get("/computers/new")  
.headers(headers\_0))  
.pause(1)  
.exec(http(“request\_10”)  
.post("/computers")  
.headers(headers\_10)  
.formParam(“name”, “VoxooBox”)  
.formParam(“introduced”, “12.11.2017”)  
.formParam(“discontinued”, “”)  
.formParam(“company”, “16”)  
.check(status.is(400)))  
.pause(1)  
.exec(http(“request\_11”)  
.post("/computers")  
.headers(headers\_10)  
.formParam(“name”, “VoxooBox”)  
.formParam(“introduced”, “2017.08.17”)  
.formParam(“discontinued”, “”)  
.formParam(“company”, “16”)  
.check(status.is(400)))  
.pause(1)  
.exec(http(“request\_12”)  
.post("/computers")  
.headers(headers\_10)  
.formParam(“name”, “VoxooBox”)  
.formParam(“introduced”, “2017-08-17”)  
.formParam(“discontinued”, “”)  
.formParam(“company”, “16”))  
}

val users = scenario(“Users”).exec(Search.search, Browse.browse);  
val admins = scenario(“Admins”).exec(Search.search, Browse.browse, Edit.edit);

setUp(  
users.inject(constantUsersPerSec(200) during (300 seconds)),  
admins.inject(constantUsersPerSec(50) during (300 seconds))  
).protocols(httpProtocol)

}

`

```auto

```

```auto
it goes maximum to indicator of users:

```

---

<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:** [October 17, 2017, 12:11pm UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/2 "2017-10-17T12:11:52Z")

</div>

Hello,

Please realize that you’re you’re hammering a demo app we provide for our tutorials.  
Not only do we gracefully pay for hosting and bandwidth costs, but this instance is shared with all other newcomers who try to complete those tutorials.

If you want to hammer a server at 600 requests per second, please use your own.

Thanks,

---

<div class="post-metadata">

**Author:** ![Alexander\_Tunick](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@Alexander\_Tunick](https://community.gatling.io/u/Alexander_Tunick)\
**Post date:** [October 17, 2017, 12:20pm UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/3 "2017-10-17T12:20:12Z")

</div>

_Stéphane thanks for your incredibly swift reply, If i get you right, you mean i use_ **[computer-database.gatling.io](http://computer-database.gatling.io/).** and this number of users is over for hammering?  
So if I use for instance any(almost) other websites it’s going to be ok?

1. And second question then, why number of users is different in here:

```auto
And why when I launch

```

```auto
 users.inject(constantUsersPerSec(200) during (300 seconds)),
 admins.inject(constantUsersPerSec(50) during (300 seconds))

```

```auto

```

```auto
In terminal it's 
waiting: 55156 / active: 4842 / done:2
 waiting: 13788 / active: 1212 / done:0

```

---

<div class="post-metadata">

**Author:** ![Barry\_Perez](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Barry\_Perez](https://community.gatling.io/u/Barry_Perez)\
**Post date:** [October 18, 2017, 6:38am UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/4 "2017-10-18T06:38:43Z")

</div>

The general rule is not to load test against a site that you don’t own or have permission to generate load against!

Clearly the demp app isn’t scaled to handle that level of load. Try this sort of thing against your own internally hosted apps.

---

<div class="post-metadata">

**Author:** ![alexander.tunick](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@alexander.tunick](https://community.gatling.io/u/alexander.tunick)\
**Post date:** [October 18, 2017, 7:53am UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/5 "2017-10-18T07:53:17Z")

</div>

Barry Perez, Thanks, I got it. But one more question still stays opened, about number of users I launch  
Or do in need to create the separate topic for this?

```auto
users.inject(constantUsersPerSec(200) during (300 seconds)),
 admins.inject(constantUsersPerSec(50) during (300 seconds))

```

```auto

```

```auto
In terminal it's 
waiting: 55156 / active: 4842 / done:2
 waiting: 13788 / active: 1212 / done:0

```

```auto

```

```auto
On idea it's going to be 250 users during 300 seconds, no more no less,

```

```auto
but why in terminal here is:

```

---

<div class="post-metadata">

**Author:** ![Lewis\_Cawthorne](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@Lewis\_Cawthorne](https://community.gatling.io/u/Lewis_Cawthorne)\
**Post date:** [October 19, 2017, 2:17pm UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/6 "2017-10-19T14:17:01Z")

</div>

I’m a newbie too, but it looks like your doing 200 **users per second** over 300 seconds, which is 300 \* 200=60000 normal users, then doing 50 \* 300 = 15000 admin users, which is why the terminal shows waiting 55156 + active 4842 = 60000 total and 13788 + 1212 = 15000 admin total.

---

<div class="post-metadata">

**Author:** ![alexander.tunick](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@alexander.tunick](https://community.gatling.io/u/alexander.tunick)\
**Post date:** [October 19, 2017, 2:47pm UTC](https://community.gatling.io/t/connectexception-connection-timed-out-computer-database-gatling-io-35-158-229-206-80/3995/7 "2017-10-19T14:47:06Z")

</div>

Yeah, pretty logical, thank you, Lewis!
