For some requests getting handshake timed out


Getting following exception for the last around 5 to 20 users, handshake timed out
at org.asynchttpclient.netty.SimpleFutureListener.operationComplete(
at io.netty.util.concurrent.DefaultPromise.notifyListener0(
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(
at io.netty.util.concurrent.DefaultPromise.notifyListeners(
at io.netty.util.concurrent.DefaultPromise.tryFailure(
at io.netty.handler.ssl.SslHandler.notifyHandshakeFailure(
at io.netty.handler.ssl.SslHandler.access$1100(
at io.netty.handler.ssl.SslHandler$
at io.netty.util.concurrent.PromiseTask$
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
at io.netty.util.concurrent.SingleThreadEventExecutor$
at io.netty.util.concurrent.DefaultThreadFactory$
Caused by: handshake timed out
at io.netty.handler.ssl.SslHandler.handshake(…)(Unknown Source)

Following is the scenario and settings,
For each user,
Request1: getting access token for authorization
Request2: login using credentials and accss token from Request1

I am using 6 users and credentials are being feeded using JSON file feeder with circular.
Logger level is “ERROR”.

Trying to test the limit number of users the application handles at the same time.

Using atOnceUsers(1) and following is the problem,

Getting above exception for the number of failed request,

atOnceUsers(30) → 27 Success 2 Failed
atOnceUsers(50) → 46 Success 4 Failed
atOnceUsers(100) → 94 Success 6 Failed
atOnceUsers(150) → 144 Success 10 Failed / sometimes 15 failed
atOnceUsers(200) → 186 Success 14 Failed / sometimes 18 failed
atOnceUsers(300) → 282 Success 18 Failed / sometimes 22 failed / sometimes 38 failed

What could be the cause? Thanks in advance.

This does not seem to be a Gatling issue, rather a application server issue which probably is not able to process all the requests and thus results in some timeouts.
Well, if you want to find the limit of the application, instead of just running all the 300 users at the same time and each executing the flow just once, better goal would be to find the limit of the application in terms of requests per second in a test which is run over a longer period of time.
And then check the error rate and response time behavior with increase in the traffic.

Ex. inject(rampUsersPerSec(1) to 300 during(30 minutes))