Hi Endre, Thanks!!!!
In our real code it was about PUT requests so I was not expecting an answer. I was wrong in that ;-( I used def readEntity(r: HttpResponse) = r.entity.dataBytes.runWith(Sink.ignore) to read the entity fully which is a bit different from what you used, but hey, my problem is solved! Thanks. Martijn On Tuesday, June 30, 2015 at 9:57:06 AM UTC+2, Akka Team wrote: > > Hi Martijn, > > You are not consuming the entity bytes of the response. You should do: > > response.entity.entityBytes.runWith(Sink.cancel) > > Otherwise it keeps the TCP connection open, not consuming the "tail" of > the TCP connection (remember that Akka Http is streaming). > > -Endre > > On Tue, Jun 30, 2015 at 9:51 AM, Martijn Blankestijn < > [email protected] <javascript:>> wrote: > >> Hi, >> >> I witnessed strange behaviour in my tests with Akka HTTP while upgrading >> from RC3 to RC4. >> >> It seems like HTTP connections which are used with Http.singleRequest are >> not being reused, which leads to failures on RC4. >> So on RC4 only 4 HTTP calls are being made (equal to the default >> akka.http.host-connection-pool.max-connections setting) >> >> RC3 apparently reuses the connections. But still takes about 5 seconds >> between a new burst of 4 requests. >> >> "The Akka HTTP Client" should "be able to execute requests in parallel" in { >> printConfig >> >> val futResponses = (0 until 20) >> .map(i => Http().singleRequest(HttpRequest(uri = "http://akka.io")) >> .map(response => { >> print(response.toString) >> response >> })) >> val result = Future.sequence(futResponses) >> >> print("Before waiting") >> Await.ready(result, 20 second) >> print("After await ready") >> } >> >> >> I put the code on a small project on Github ( >> https://github.com/martijnblankestijn/akka-http-rc3-rc4) which shows the >> difference if you switch from RC3 to RC4 in the build.sbt. >> >> Am I doing something wrong or is this a bug? >> >> Thanks, >> >> Martijn Blankestijn >> >> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Akka Team > Typesafe - Reactive apps on the JVM > Blog: letitcrash.com > Twitter: @akkateam > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
