Request timeout to localhost

Hi guys, I am using Gatling since 2 weeks and it is kinda interesting because it timeouts my requests to my localhost after all I am doing pretty simply scenario.

package placeBet

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

class placeBet extends Simulation {

// List of environments
val environments: Map[String, String] =
“localhost” → “http://localhost

// List of user token
val tokens: Array[String] =
// CustomerId = 123

val environment = (environments get “localhost”).getOrElse("")

// First HTTP protocol with first token
val httpProtocol = http
“Accept” → “/”,
“Authorization” → tokens(0),
“ContentType” → “application/json”

val headers = Map(
“accept-encoding” → “gzip, deflate”,
“cache-control” → “no-cache”,
“content-length” → “242”)

// First scenario - place bet ← currently it is set up for dev/local
val scn = scenario(“placeBet”)


Sometimes it works sometimes not…

Can you help me? I already increased request timeout configuration with no luck.

Sometimes it works somethimes not suggest that theres something wrong with your service rather than gatling, try hitting it manually using curl or postman with same request…