Hi I am using Gatling 3.1.1 and want to simulate 1000 concurrent WebSocket connections. But it failing at 50. In the below code, I tried to simulate 100 concurrent users, all are connecting to WebSocket in parallel. But only a few of them are able to make WebSocket connection and rest are failing. Below is my code snippet
`
val EmployeeCredentialsFeeder = csv(“data/Test Employees.csv”).batch(30) // Employees Credential feeder(csv)
val scn = scenario(“TXP_Login”)
.feed(EmployeeCredentialsFeeder) // feed clientID, username and password for Login from csv file
.exec(checkLogin()) //Execute checkLogin method
.pause(1)
//create feeder for SessionID and Employee ID. poll() method will retrieve the head item from the queue and delete it
// Here Session ID’s and Employee ID’s are polled from queue and map to Session_ID and Employee_ID variable
val SessionIDFeeder = Iterator.continually(Map(“Session_ID” → Session_ID_Queue.poll()))
val EmployeeIDFeeder = Iterator.continually(Map(“Employee_ID” → Employee_ID_Queue.poll()))
// Get and Update self Scehdule
val scn1 = scenario(“Get_Assign_SelfSCH_Websocket”)
//Make the variables as session variables to have them avaiable in next scenario
.exec(.set(“startDate”,startDate))
.exec(.set(“endDate”, endDate))
.exec(.set(“Company_ID”, Company_ID))
.exec(.set(“Branch_ID”, Branch_ID))
//Feed the SessionID, EmployeeID, and clientID through the feeder
.feed(SessionIDFeeder)
.feed(EmployeeIDFeeder)
.feed(EmployeeCredentialsFeeder)
// Make Websocket Connection
.exec(ws(“ConnectSocket”)
.connect("/?clientId=${ClientID}&cid=${Company_ID}&bid=${Branch_ID}&sessionId=${Session_ID}&eid=2")
.onConnected(
exec(ws(“Connection Check”)
.sendText(“Ping”))
.pause(3)
.exec(getSelfSchedule()) // run getSelfSchedule method
.pause(2)
.exec(updateSelfSchedule()) // run updateSelfSchedule method
))
setUp(scn.inject(rampUsers(50) during(15)), scn1.inject(nothingFor(18 seconds), atOnceUsers(50)).protocols(httpProtocol))
}
`
Only 23 out of 50 were able to make successful connections and 27 failed. I need to simulate this scenario for 1000’s of users. Any idea how to make these many concurrent connections? Below is the error that I am getting. Please help