Gatling timeout issues

I am trying to understand the gatling report that we ran for our project scenarios. We have automated SOAPUI POST request to simulate 100 users ramping up for 10 mins we ensured required post information is correctly imported in application. But still not sure why I am getting timeout exceptions and j.i.IOException: Premature close in the final gatling report.


injection method

  setUp(
    scn.inject(
      rampUsersPerSec(1) to 100 during (10 minutes),
    ).protocols(httpConf)
  )

gatling log

19:26:00.719 [DEBUG] i.g.http.engine.GatlingHttpListener$ - Request 'Post Import Visit Manager' failed for user 30038
io.gatling.http.client.impl.HttpAppHandler$1: Premature close
19:26:00.722 [DEBUG] i.g.h.e.response.DefaultStatsProcessor - Request 'Post Import Visit Manager' failed for user 30038: j.i.IOException: Premature close
19:26:00.722 [DEBUG] i.g.h.e.response.DefaultStatsProcessor - 
>>>>>>>>>>>>>>>>>>>>>>>>>>
Request:
Post Import Visit Manager: KO j.i.IOException: Premature close
=========================
Session:
Session(Import Visit Manager,30038,HashMap(visitorDesc -> automation-933, gatling.http.cache.baseUrl -> https://corena.dal-triage.testing.flatirons.cloud, gatling.http.cache.dns -> io.gatling.http.resolver.ShufflingNameResolver@17a45aa0, updatedSoapBody -> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vis="http://visitimport.ws.ietp.infotrustgroup.com/">
       <soapenv:Header/>
       <soapenv:Body>
         <vis:visitImport>
           <arg0>
             <info>
               <carrier-code>FS</carrier-code>
               <airplane-tail>5503</airplane-tail>
               <visit-type>Test</visit-type>
               <station-code>AMA</station-code>
               <track>for test</track>
               <sched-date>2024-02-06</sched-date>
               <sched-time>17:48:43</sched-time>
                <visit-desc>automation-933</visit-desc>
               <days-out-svc>4</days-out-svc>
               <max-sched-date>2024-02-06</max-sched-date>
               <pkg-id>776</pkg-id>
             </info>
             <jobs>
               <job>
                 <job-num>99</job-num>
                 <wc-list identity="123405">
                   <work-card wc-number="1290-6004"/>
                 </wc-list>
               </job>
             </jobs>
           </arg0>
         </vis:visitImport>
       </soapenv:Body>
     </soapenv:Envelope>, pkgId -> 776, gatling.http.ssl.sslContexts -> io.gatling.http.util.SslContexts@573798e3),KO,List(),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$627/0x000000080066f840@41793282,io.netty.channel.nio.NioEventLoop@68ba310d)
=========================
HTTP request:
POST https://corena.dal-triage.testing.flatirons.cloud/ietp-s1000d-master/ws/visitimport
headers:
	Content-Type: text/xml
	Accept: */*
	username: Administrator
	password: secret
	host: corena.dal-triage.testing.flatirons.cloud
	content-length: 1169
body:StringChunksRequestBody{charset=UTF-8, content=<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vis="http://visitimport.ws.ietp.infotrustgroup.com/">
       <soapenv:Header/>
       <soapenv:Body>
         <vis:visitImport>
           <arg0>
             <info>
               <carrier-code>FS</carrier-code>
               <airplane-tail>5503</airplane-tail>
               <visit-type>Test</visit-type>
               <station-code>AMA</station-code>
               <track>for test</track>
               <sched-date>2024-02-06</sched-date>
               <sched-time>17:48:43</sched-time>
                <visit-desc>automation-933</visit-desc>
               <days-out-svc>4</days-out-svc>
               <max-sched-date>2024-02-06</max-sched-date>
               <pkg-id>776</pkg-id>
             </info>
             <jobs>
               <job>
                 <job-num>99</job-num>
                 <wc-list identity="123405">
                   <work-card wc-number="1290-6004"/>
                 </wc-list>
               </job>
             </jobs>
           </arg0>
         </vis:visitImport>
       </soapenv:Body>
     </soapenv:Envelope>}
=========================
HTTP response:
<<<<<<<<<<<<<<<<<<<<<<<<<
19:26:00.722 [DEBUG] io.gatling.core.action.Exit - End user #30038
19:26:00.722 [DEBUG] i.g.core.controller.inject.Injector - End user #Import Visit Manager
19:26:00.722 [INFO] i.g.core.controller.inject.Injector - All users of scenario Import Visit Manager are stopped
19:26:00.723 [INFO] i.g.core.controller.inject.Injector - Stopping
19:26:00.724 [INFO] io.gatling.core.controller.Controller - Injector has stopped, initiating graceful stop
19:26:00.750 [DEBUG] io.gatling.core.controller.Controller - StatsEngine was stopped
19:26:00.811 [INFO] akka.actor.CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason]
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 21 thread-local buffer(s) from thread: gatling-1-1
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-7
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-2
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-6
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 26 thread-local buffer(s) from thread: gatling-1-3
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 23 thread-local buffer(s) from thread: gatling-1-8
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 23 thread-local buffer(s) from thread: gatling-1-5
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 21 thread-local buffer(s) from thread: gatling-1-4
19:26:00.869 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-9
19:26:00.870 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 24 thread-local buffer(s) from thread: gatling-1-10
19:26:00.871 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-12
19:26:00.871 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-11
19:26:00.872 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 22 thread-local buffer(s) from thread: gatling-1-14
19:26:00.872 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 23 thread-local buffer(s) from thread: gatling-1-16
19:26:00.872 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 24 thread-local buffer(s) from thread: gatling-1-13
19:26:00.874 [DEBUG] io.netty.buffer.PoolThreadCache - Freed 21 thread-local buffer(s) from thread: gatling-1-15
19:26:00.885 [INFO] io.gatling.charts.stats.LogFileReader$ - Collected List(E:\visitmanager\mykcs\target\gatling\importvisitmanager-20240206134509062\simulation.log) from importvisitmanager-20240206134509062
19:26:00.907 [INFO] io.gatling.charts.stats.LogFileReader - First pass

Gatling is just the messenger that your target application (including your network and load balancers) can’t handle the load you’ve designed.

Premature close means the server has closed the socket after the request was sent but before sending a full response.

Possible causes:

  • your load design is wrong and you’re hammering your system way too hard. In your case, as you’re using SOAP, your real clients are probably other applications with a keep-alive connection pool. In this case, you should be using shareConnections so you have 1 shared connection pool instead of one per virtual user.
  • your edge servers can’t handle that many sockets
  • your application closes the connection on error instead of replying with a valid HTTP response (this can make perfect sense in some cases)

how to use this shareConnections? Pls brief about this parameter.
what would be the correct way to handle load then?

Have you searched and read the documentation?

Yes couldnt get much details

shareConnections

The default behavior is that every virtual user has its own connection pool and its own SSLContext. This behavior meets your needs when you want to simulate internet traffic where each virtual user simulates a web browser.

Instead, if you want to simulate server to server traffic where the actual client has a long-lived connection pool, you want to have the virtual users share a single global connection pool.

If you want more details about .shareConnections() you can read this topic → shareConnections() in Server to Server Simulation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.