java.io.IOException: Remotely closed

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:

https://groups.google.com/forum/#!searchin/gatling/java.io.IOException$3A$20Remotely$20closed/gatling/xhwWNUC_ZAk/Nfrka7gX2cwJ

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.

https://groups.google.com/forum/#!searchin/gatling/java.io.IOException$3A$20Remotely$20closed/gatling/DISSgyzRmQE/7JstdYrsUxsJ

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

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:

Redirecting to Google Groups

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.

Redirecting to Google Groups

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.

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 uri2 = “”“http://clients1.google.com/generate_204"”"
val uri3 = “”“http://www.google-analytics.com/collect”""
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

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?

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?

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.

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.

It depends on your server, if it’s capable of logging the event of closing a connection.
But really, that’s what happens.

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?

No idea. Having this exception with one single user is highly suspicious.

One of the reasons for that error is, invoking your test endpoint with http:// instead of https://.