# Why is Gatling pausing before sending Requests

**URL:** <https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117>\
**Category:** Gatling (Open-Source)\
**Created:** [July 9, 2019, 9:18am UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117 "2019-07-09T09:18:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 9, 2019, 9:18am UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117/1 "2019-07-09T09:18:26Z")

</div>

Looks like a bad idea to start developing an extension on top of an obsolete version. Current version is 3.1.3.

---

<div class="post-metadata">

**Author:** ![Bilal\_Abdelkader](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Bilal\_Abdelkader](https://community.gatling.io/u/Bilal_Abdelkader)\
**Post date:** [July 9, 2019, 1:03pm UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117/2 "2019-07-09T13:03:08Z")

</div>

Plugin is now updated to Gatling 3.1.3.

Although the empty stats block disappeared, there’s always 25 seconds between the Run and the Injection:

```auto
**14:50:59.914** [INFO] a.e.s.Slf4jLogger - Slf4jLogger started
Simulation RadiusSimulation started...
**14:51:29.114** [INFO] i.g.c.s.w.ConsoleDataWriter - Initializing

```

As for the scenario, the engine spread the 1000 actors, instead injecting all the users at Once, which leads the 1 second test, +/- a few seconds for the final requests, to put 15 seconds to complete !!

`

```auto
14:50:59.354 [INFO] i.g.c.c.GatlingConfiguration$ - Gatling will try to use 'gatling.conf' as custom config file.
**14:50:59.914** [INFO] a.e.s.Slf4jLogger - Slf4jLogger started
Choose a simulation number:
     [0] HttpSimulation
     [1] RadiusSimulation
1
Select run description (optional)

Simulation RadiusSimulation started...
**14:51:29.114** [INFO] i.g.c.s.w.ConsoleDataWriter - Initializing
14:51:29.114 [INFO] i.g.c.s.w.LogFileDataWriter - Initializing
14:51:29.122 [INFO] i.g.c.s.w.ConsoleDataWriter - Initialized
14:51:29.129 [INFO] i.g.c.s.w.LogFileDataWriter - Initialized
14:51:29.169 [INFO] i.g.c.c.i.Injector - StoppedInjecting
log4j:WARN No appenders could be found for logger (org.tinyradius.util.RadiusClient).
log4j:WARN Please initialize the log4j system properly.
```

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 9, 2019, 1:55pm UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117/3 "2019-07-09T13:55:13Z")

</div>

As you can see, problem doesn’t happen with Gatling HTTP support.  
So the problem is somewhere in your plugin.

---

<div class="post-metadata">

**Author:** ![Bilal\_Abdelkader](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Bilal\_Abdelkader](https://community.gatling.io/u/Bilal_Abdelkader)\
**Post date:** [July 10, 2019, 3:36pm UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117/4 "2019-07-10T15:36:23Z")

</div>

Woooow, thanks for this answer.

At the end of the day, I’d figured out the problem/solution, and the Plugin is on github: [**gatling-radius**](https://github.com/bpabdelkader/gatling-radius)

A matter of sharing my experience on the above question with the group users: the calls are non-blocking now, thanks for Future

The Action class is now as follow:

`

package com.ngenia.radius.action

import scala.util.{Failure, Success}

import io.gatling.core.action.\_  
import io.gatling.core.session.Session  
import io.gatling.core.stats.StatsEngine  
import io.gatling.commons.util.Clock

import scala.concurrent.Future  
import scala.concurrent.ExecutionContext.Implicits.global

import com.ngenia.radius.client  
import com.ngenia.radius.client.RadiusUtils  
import com.ngenia.radius.protocol.RadiusProtocol  
import com.ngenia.radius.request.\_

case class RadiusAction(  
requestType: Type,  
radiusAttributes: RadiusAttributes,  
radiusProtocol: RadiusProtocol,  
clock: Clock,  
statsEngine: StatsEngine,  
next: Action  
) extends RadiusLogging {

override def name: String = “RADIUS”

override def execute(session: Session): Unit = {

implicit val iSession = session

val start = clock.nowMillis

**val future = Future {**  
client.RadiusClient.sendRequest(radiusProtocol, requestType, radiusAttributes) // The main Radius Call  
**}**

**future.onComplete {**  
case Success(response) =\> {  
log(start, clock.nowMillis, response.\_2, radiusAttributes.requestName, session, statsEngine)  
next !  
session  
.set(“Acct-Session-Id”, RadiusUtils.sessionId)  
.set(“Framed-IP-Address”, RadiusUtils.framedIPAddress(response.\_1))  
}  
case Failure(e) =\> e.printStackTrace  
}  
}  
}

`

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [July 10, 2019, 4:01pm UTC](https://community.gatling.io/t/why-is-gatling-pausing-before-sending-requests/5117/5 "2019-07-10T16:01:01Z")

</div>

Great!

Feel free to send a PR to get your plugin listed in the community extensions, see [https://github.com/gatling/gatling/blob/master/src/sphinx/extensions/index.rst](https://github.com/gatling/gatling/blob/master/src/sphinx/extensions/index.rst).

Cheers,
