# Dandling Connection after upgrade to 2.2.0

**URL:** <https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257>\
**Category:** Gatling (Open-Source)\
**Created:** [September 8, 2016, 11:25pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257 "2016-09-08T23:25:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_bhat](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@prashant\_bhat](https://community.gatling.io/u/prashant_bhat)\
**Post date:** [September 8, 2016, 11:25pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/1 "2016-09-08T23:25:31Z")

</div>

Hi,

After we upgraded gatling to 2.2.0 / 2.2.2 from 2.1.6 , we are facing a dandling connections issue.  
After the test duration is complete , the test does not exit , we can still see some active users in the logs.

This issue seems have been observed earlier , [http://gatling.io/docs/2.2.2/project/faq.html](http://gatling.io/docs/2.2.2/project/faq.html)  
But setting this config is not helping.

Any ideas ?

Regards  
Prashant

---

<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:** [September 11, 2016, 7:11pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/2 "2016-09-11T19:11:05Z")

</div>

Please provide app and simulation samples so we can reproduce.

---

<div class="post-metadata">

**Author:** ![prashant\_bhat](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@prashant\_bhat](https://community.gatling.io/u/prashant_bhat)\
**Post date:** [September 14, 2016, 6:01pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/3 "2016-09-14T18:01:28Z")

</div>

Hi Stephane ,  
Below is my Simulation class file , Let me know if any further info needed,

import io.gatling.core.session.SessionAttribute  
import io.gatling.core.structure.PopulationBuilder  
import io.gatling.http.Predef.\_  
import io.gatling.core.Predef.\_  
import scala.collection.mutable.ListBuffer  
import scala.concurrent.duration.\_

class paLoadScenario extends Simulation  
{

var allTypical = “API\_pa\_1:90,API\_pa\_2:10”  
var BASE\_URL = System.getProperty(“url”, “[zzzzzzz.com](http://zzzzzzz.com)”)  
var nDuration : Double = System.getProperty(“steadyDuration”, “1” ).toDouble  
var flowSelection=System.getProperty(“flowSelection”, allTypical)  
var nDurationRamp : Double = System.getProperty(“rampDuration”, “1” ).toDouble

val execMap:scala.collection.mutable.Map[String, Double]= scala.collection.mutable.Map(  
“API\_pa\_1” → 0,  
“API\_pa\_2” → 0  
)

util.initialize(allTypical,flowSelection,execMap);

val pa\_data = csv(“data.csv”).random

val httpProtocol = http  
.baseURL(“https://”+BASE\_URL)  
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8”)  
.acceptEncodingHeader(“gzip, deflate”)  
.acceptLanguageHeader(“en-US,en;q=0.5”)  
.connectionHeader(“keep-alive”)  
.doNotTrackHeader(“1”)  
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0”)  
.proxy(Proxy(“[proxy.net](http://proxy.net)”, 80))

val logger = org.slf4j.LoggerFactory.getLogger(“websPerfLogger”)

val Scenario1=scenario(“Scenario1”)  
.feed(pa\_data)  
.exec(Object1.Transaction1)

val Scenario2=scenario(“Scenario2”)  
.feed(pa\_data)  
.exec(Object2.Transaction2)

val lst: ListBuffer[PopulationBuilder] = ListBuffer()  
if(execMap(“API\_pa\_1”) \> 0){  
lst+= Scenario1.inject(rampUsersPerSec(0.1) to execMap(“API\_pa\_1”) during(nDurationRamp minutes),constantUsersPerSec(execMap(“API\_pa\_1”)) during(nDuration minutes))  
}  
if(execMap(“API\_pa\_2”) \> 0){  
lst+= Scenario2.inject(rampUsersPerSec(0.1) to execMap(“API\_pa\_2”) during(nDurationRamp minutes),constantUsersPerSec(execMap(“API\_pa\_2”)) during(nDuration minutes))  
}

setUp(lst:\_\*).protocols(httpProtocol)  
.assertions(  
forAll.failedRequests.percent.lessThan(20),  
forAll.responseTime.percentile3.lessThan(1500)  
)  
}

---

<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:** [September 14, 2016, 6:41pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/4 "2016-09-14T18:41:26Z")

</div>

I would need a sample app under test that exhibits the issue. A simulation doesn’t help.

---

<div class="post-metadata">

**Author:** ![prashant\_bhat](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@prashant\_bhat](https://community.gatling.io/u/prashant_bhat)\
**Post date:** [September 14, 2016, 11:30pm UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/5 "2016-09-14T23:30:55Z")

</div>

When you say sample app, what are you refering to exactly ?  
You want me to send you a test run log which exhibits this issue ?

---

<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:** [September 15, 2016, 4:38am UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/6 "2016-09-15T04:38:43Z")

</div>

It’s pretty clear what a sample is:

- either a public facing website, or demo web application that we can use
- a corresponding full working simulation (not a part of part that doesn’t even compile) that we can use to hit your sample and that then exhibits your problem

---

<div class="post-metadata">

**Author:** ![prashant\_bhat](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@prashant\_bhat](https://community.gatling.io/u/prashant_bhat)\
**Post date:** [September 22, 2016, 12:18am UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/7 "2016-09-22T00:18:33Z")

</div>

Hi Stephane,  
I would not able to do that owning to sensitive information.  
Do you have any tips for me on how i can reproduce this issue.

Note that any version after 2.1.6 is causing this issue. 2.1.6 works fine but 2.1.7 onwards , we face this issue for all the release versions.

---

<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:** [September 22, 2016, 6:36am UTC](https://community.gatling.io/t/dandling-connection-after-upgrade-to-2-2-0/3257/8 "2016-09-22T06:36:46Z")

</div>

I had a looking at the commit log between those 2 versions, but couldn’t find any obvious possible culprit.  
Could be Gatling, AsyncHttpClient or Netty.

If you can’t grant access, and can’t build a similar and more simple application that you can share, I’m afraid you’ll have to investigate yourself.  
You can try building Gatling for each of those commit to try to narrow the culprit.

Otherwise, you can contract with us so we can investigate in your environnement without you having to share publicly.

Regards,
