java.io.IOException: Remotely closed

1,857 views
Skip to first unread message

Magnus Jensen

unread,
Nov 10, 2014, 1:08:13 PM11/10/14
to gat...@googlegroups.com
I get about 19%:


18:57:04.502 [WARN ] i.g.h.a.AsyncHandlerActor - Request 'request_8' failed: java.io.IOException: Remotely closed

running my simulation. It has been craeted using the Gatling recorder (Gatling 2.0.1).

Searching for this topic in Gatling User Group gives me:


Concluding with this to be a problem with the server itself and advised to NOT set  #maxRetry = 0 to  maxRetry = 4, just to 'avoid the problem'.

This post however concludes to set maxRetry=4 to solve the problem with remotely closed connections.


My question is, what is the correct solution to this problem with the (Remote) server closing down connections?

The site I am hitting with Gatling is a live web-site and I assume it can handle more that this:

setUp(scn.inject(constantUsersPerSec(10) during (10))).protocols(httpProtocol)


Magnus


Stéphane Landelle

unread,
Nov 10, 2014, 1:39:13 PM11/10/14
to gat...@googlegroups.com
2014-11-10 19:08 GMT+01:00 Magnus Jensen <maj...@gmail.com>:
I get about 19%:


18:57:04.502 [WARN ] i.g.h.a.AsyncHandlerActor - Request 'request_8' failed: java.io.IOException: Remotely closed

running my simulation. It has been craeted using the Gatling recorder (Gatling 2.0.1).

Searching for this topic in Gatling User Group gives me:


Concluding with this to be a problem with the server itself and advised to NOT set  #maxRetry = 0 to  maxRetry = 4, just to 'avoid the problem'.

This post however concludes to set maxRetry=4 to solve the problem with remotely closed connections.

Outdated information from a one year old post.

 


My question is, what is the correct solution to this problem with the (Remote) server closing down connections?

The site I am hitting with Gatling is a live web-site and I assume it can handle more that this:

setUp(scn.inject(constantUsersPerSec(10) during (10))).protocols(httpProtocol)



I could investigate if I could reproduce.

Magnus Jensen

unread,
Nov 10, 2014, 1:54:41 PM11/10/14
to gat...@googlegroups.com
Ok Stephane, my script is below and be ran as is.


import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

class osloKommune extends Simulation {

        val httpProtocol = http
        .baseURL("http://www.oslo.kommune.no")
         .inferHtmlResources(BlackList(""".*\.js""", """.*\.css""", """.*\.gif""", """.*\.jpeg""", """.*\.jpg""", """.*\.ico""", """.*\.woff""", """.*\.(t|o)tf""", """.*\.png"""), WhiteList())
        .acceptHeader("""image/png,image/*;q=0.8,*/*;q=0.5""")
         .acceptEncodingHeader("""gzip, deflate""")
             .acceptLanguageHeader("""nb-no,nb;q=0.9,no-no;q=0.8,no;q=0.6,nn-no;q=0.5,nn;q=0.4,en-us;q=0.3,en;q=0.1""")
             .connection("""keep-alive""")
          .userAgentHeader("""Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0""")

        val headers_0 = Map("""Accept""" -> """text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8""")

        val headers_1 = Map("""Accept""" -> """*/*""")

    val uri1 = """http://www.loop11.com/triton/time"""
   val uri4 = """http://speech.leseweb.dk/rawfiles"""
   val uri5 = """http://www.google.com/cse/cse.js"""
   val uri6 = """http://www.oslo.kommune.no"""
   val uri7 = """m.addthis.com"""

        val scn = scenario("osloKommune")
              .exec(http("request_0")
                .get("""/""")
                  .headers(headers_0)
                    .resources(http("request_1")
                   .get(uri5 + """?cx=002327373540402911597:wabn7l-txp4""")
                       .headers(headers_1),
           http("request_2")
                      .get(uri3 + """?v=1&_v=j30&aip=1&a=1991371234&t=pageview&_s=1&dl=http%3A%2F%2Fwww.oslo.kommune.no%2F&ul=nb-no&de=UTF-8&dt=Hovedside%20-%20Oslo%20kommune&sd=24-bit&sr=1280x800&vp=1280x615&je=1&fl=15.0%20r0&_u=eCCAAEQjI~&jid=&cid=2139518378.1415618356&tid=UA-40971894-1&gtm=GTM-6R2R&z=1972736709"""),
           http("request_3")
                .get(uri2 + """"""),
           http("request_4")
                      .get(uri1 + """/1415644558623/3025af8955394915db3fd6446510c51cdcae0dc8/getsession""")
                  .headers(headers_1),
           http("request_5")
                      .get(uri4 + """/"""))
                  .check(status.is(200)))
        .pause(2)
              .exec(http("request_6")
                .get(uri3 + """?v=1&_v=j30&a=1991371234&t=event&ni=1&_s=1&dl=http%3A%2F%2Fwww.oslo.kommune.no%2F&ul=nb-no&de=UTF-8&dt=Hovedside%20-%20Oslo%20kommune&sd=24-bit&sr=1280x800&vp=1280x615&je=1&fl=15.0%20r0&ec=Interne%20lenker&ea=Klikk&el=http%3A%2F%2Fwww.oslo.kommune.no%2Fom_oslo_kommune%2Fbydelsoversikt%2F&_u=eCCACEQnJ~&jid=&cid=2139518378.1415618356&tid=UA-40971894-1&gtm=GTM-6R2R&z=1852642060""")
                   .resources(http("request_7")
                   .get(uri3 + """?v=1&_v=j30&a=1991371234&t=event&ni=1&_s=1&dl=http%3A%2F%2Fwww.oslo.kommune.no%2F&ul=nb-no&de=UTF-8&dt=Hovedside%20-%20Oslo%20kommune&sd=24-bit&sr=1280x800&vp=1280x615&je=1&fl=15.0%20r0&ec=Toppmeny&ea=Bydeler&el=Bydeler%20-%20www.oslo.kommune.no&_u=eCCACEQnJ~&jid=&cid=2139518378.1415618356&tid=UA-40971894-1&gtm=GTM-6R2R&z=1920273329"""),
           http("request_8")
                .get(uri6 + """/om_oslo_kommune/bydelsoversikt/""")
                    .headers(headers_0),
           http("request_9")
                      .get(uri6 + """/om_oslo_kommune/bydelsoversikt/""")
                    .headers(headers_0),
           http("request_10")
                     .get(uri5 + """?cx=002327373540402911597:wabn7l-txp4""")
                       .headers(headers_1),
           http("request_11")
                     .get(uri3 + """?v=1&_v=j30&aip=1&a=214734363&t=pageview&_s=1&dl=http%3A%2F%2Fwww.oslo.kommune.no%2Fom_oslo_kommune%2Fbydelsoversikt%2F&ul=nb-no&de=UTF-8&dt=Bydelsoversikt%20-%20Oslo%20kommune&sd=24-bit&sr=1280x800&vp=1280x615&je=1&fl=15.0%20r0&_u=eCCAAEQjI~&jid=&cid=2139518378.1415618356&tid=UA-40971894-1&gtm=GTM-6R2R&linkid=topHoverMenu&z=1943884429"""),
           http("request_12")
                    .get(uri2 + """"""),
           http("request_13")
                     .get(uri1 + """/1415644562303/3025af8955394915db3fd6446510c51cdcae0dc8/getsession""")
                  .headers(headers_1),
           http("request_14")
                     .get(uri4 + """/"""),
           http("request_15")
                    .get("http://" + uri7 + """/live/red_lojson/300lo.json?13vx90y&colc=1415644563063&si=546105929cdde096&uid=5457689a0d25a6c5&pub=friweb&rev=9.3&jsl=3&ln=nb&pc=men%2Ctbx&vpc=&dp=www.oslo.kommune.no&fp=om_oslo_kommune%2Fbydelsoversikt%2F&aa=0&of=0&uf=0&nt=cs;1,ce;1,dc;49,dclee;49,dcles;49,di;49,dl;30,dle;1,dls;1,fs;1,lee;u,les;49,ns;0,rs;1,rspe;46,rsps;1,scs;u&pd=0&irt=1&vcl=1&md=0&ct=1&tct=0&abt=0&lt=71&cdn=0&lnlc=NO&whcs=0&tl=c%3D132%2Cm%3D841%2Ci%3D855%2Cxm%3D912%2Cxp%3D923&pi=1&&rb=2&gen=100&callback=_ate.track.hsr&mk=Oslo%20kommune%2COslo&""")
                 .headers(headers_1)))

  setUp(scn.inject(constantUsersPerSec(35) during (10))).protocols(httpProtocol)
}


I start the recorder (and say 'no static resources' ). Then I go to http://www.oslo.kommune.no
Then I press the link 'BYDELER' in the top-menu.
Then I press 'STO and SAVE'.

The script that is generated is the one above and running it gives me 

19:52:40.388 [WARN ] i.g.h.a.AsyncHandlerActor - Request 'request_9' failed: java.io.IOException: Remotely closed


Magnus

Stéphane Landelle

unread,
Nov 10, 2014, 4:13:11 PM11/10/14
to gat...@googlegroups.com
You're creating 350 users in 10 secs. I'm getting "Remotely closed", but connect timeouts too, then.
Are you sure you don't get banned by the firewalls? 

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Tal Salman

unread,
Feb 4, 2015, 9:57:31 AM2/4/15
to gat...@googlegroups.com
i also get it:
14:34:43.576 [WARN ] i.g.h.a.AsyncHandlerActor - Request XXX failed: java.io.IOException: Remotely closed
that happens when i try to do more load.
i am checking now that there are no errors in the server side at all.
Did you solve it?

Stéphane LANDELLE

unread,
Feb 4, 2015, 10:08:27 AM2/4/15
to gat...@googlegroups.com
You don't.
It means that your server starts killing connections because there's two many of them for its taste.
But the client might be in the middle of writing a request on the other side of the socket.
The same issue would happen with browsers, you're just facing a limitation of your application.

Stéphane Landelle
Lead developer


Tal Salman

unread,
Feb 4, 2015, 10:26:37 AM2/4/15
to gat...@googlegroups.com
great, that what i want to find.
but how can i be sure and prove it? don't i need to find any clue in the server log?
As i hear from you, you are sure that this is the limitation of the server.


On Monday, November 10, 2014 at 8:08:13 PM UTC+2, Magnus Jensen wrote:

Stéphane LANDELLE

unread,
Feb 4, 2015, 10:35:53 AM2/4/15
to gat...@googlegroups.com
It depends on your server, if it's capable of logging the event of closing a connection.
But really, that's what happens.

Stéphane Landelle
Lead developer


Julian

unread,
Jan 11, 2016, 7:38:28 AM1/11/16
to Gatling User Group
Hi,

I'm experiencing the same problem. I am using 2.1.7. Remotely Closed connections start as soon as navigating the homepage with only one user. If it's a server problem, is it right to suggest to the devs that the app needs optimization? Can you please elaborate about this error/issue further? What's the best approach?

Stéphane LANDELLE

unread,
Jan 13, 2016, 7:59:58 AM1/13/16
to gat...@googlegroups.com
No idea. Having this exception with one single user is highly suspicious.

Stéphane Landelle
GatlingCorp CEO

Jatin Vaidya

unread,
Nov 30, 2017, 3:58:06 AM11/30/17
to Gatling User Group
One of the reasons for that error is, invoking your test endpoint with http:// instead of https://.
Reply all
Reply to author
Forward
0 new messages