Hello,

the error is thrown 
here: 
https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/impl/io/TcpStages.scala#L303.
 
I agree it's hard to see why that error would happen. One thing that could 
have happened is that a connection attempt was very slow and so the 
idle-timeout kicked in and killed the TCP stage before a connection was 
established. Either there was a real connection problem, or the 
infrastructure didn't make progress in due time e.g. because of a thread 
starvation issue.

Btw. using `Source.single().via(connectionFlow).runWith(Sink.head)` is 
discouraged. Please use `Http.singleRequest` instead. See also the note 
at 
http://doc.akka.io/docs/akka-http/current/scala/http/client-side/host-level.html#host-level-api.

HTH
Johannes



On Monday, February 27, 2017 at 8:25:37 AM UTC+1, Chaitanya Mahipath wrote:
>
> Hi,
>
> I am using the akka http scaladsl library to do a HTTP calls against a 
> server. I am running a test where I have 15 threads running concurrently 
> each making around 250 GET calls(15*250). Trying to run this test for three 
> hours but I see that after two and half hours of execution I could see
> Detail: akka.stream.StreamTcpException: Connection failed. exception being 
> thrown.
>
> Initially I thought the servers isn't accepting the incoming requests. 
> But, ran the same test directly against the server and could see no issues.
> Code snippet to connect to the server -
>
> connectionFlow= 
> Http(context.system).outgoingConnectionTls(req.uri.authority.host.address(), 
> port)
> Source.single(req.withUri(req.uri.toRelative)).via(connectionFlow).runWith(Sink.head)
>  
> - Here, req is the HttpRequest.
>
> Could someone please help me out why is that StreamTcpException exception 
> is thrown?
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to