yes, running backend service and load test that service on the same machine.
do you mean that machine resources are not enough to ramp up users, due to not having sufficient memory? it is a simple resi api application that we are trying to test using gatling.
do i have to reduce ramp up rate in that case, to ramp up less no of users? Can you please advise?
My advice: do not run on the same machine were application and load test will compete for resources.
You won’t be able to find if your application stack is leaking memory, or use too much CPU, or if the issue is your simulation.
This simulation file works fine, when we ran for 30 mins, but when we ran for 30 mins, it failed.
The changes are- we have DeleteCustomer api added to processCustomers: ScenarioBuilder, and increased duration from 30 mins to 20 mins in the setup, and ramp up rate remains the same,
any reason why the below change is working fine, but not the above one?
val processCustomers: ScenarioBuilder = scenario("Post Put Delete Customers")
.repeat(1) {
feed(feeder)
.exec(http(requestName = "Post Customers")
.post(Constants.postURL)
.body(ElFileBody("body/customersPost.json")).asJson
.check(status.in(200)))
.exec(http(requestName = "Put Customers")
.put(s"/customers/#{$id}")
.body(ElFileBody("body/customersPut.json")).asJson
.check(status.in(200)))
.exec(http(requestName = "Get Customer By ID after Post Request")
.get(s"/customers/#{$id}")
.check(status.in(200)))
**.exec(http(requestName = "Delete Customers")**
** .delete(s"/customers/#{$id}")**
** .check(status.in(200)))**
}
setUp(
getCustomers.inject(nothingFor(1 seconds), atOnceUsers(15), rampUsers(485).during(600 seconds)),
processCustomers.inject(nothingFor(1 seconds), rampUsersPerSec(10).to(300).**during(20.minutes))**
.andThen(
getAllCustomers.inject(nothingFor(1 seconds), rampUsersPerSec(10).to(100).during(**10.minutes))**)
).protocols(httpConf)
we also notice Connection time out when we ran getAllCustomer with ramp up rate rampUsersPerSec(10).to(300).during(20.minutes)), is it also related to memory resources?
Hi @Banu , as stated before that your local machine doesn't have enough resources to run both services and Gatling in the same time
Please follow this sharing to understand how JSON works:
your simple REST API application may use up resources without noticing.