There's a note in the docs that the response entity must be consumed 
entirely for the connection to be freed. Although this can be done by 
recovering at some point and consuming the source, it'd be nice if it 
didn't lead to this condition.

Is it also possible that Spencer's step C is skipping any responses that 
don't validate, causing the data to not be consumed?

On Thursday, June 9, 2016 at 3:50:02 AM UTC-6, Akka Team wrote:
>
> Hi Spencer,
>
> This looks like a bug to me. I vaguely recall a similar issue being filed, 
> but I cannot find it. Can you please post your findings as an issue so we 
> can follow up?
>
> Thank you,
> -Endre
>
> On Mon, Jun 6, 2016 at 7:14 PM, Spencer Stejskal <
> [email protected] <javascript:>> wrote:
>
>> I have a graph that is leaking http connections from an Akka-Http 
>> Superpool when the graph fails.  The general shape of the graph is:
>>
>> A ~> B ~> C ~> D ~> E ~> F
>>
>> The stage actions are:  
>> A emits HttpRequests   
>> B is the superpool (created by Http().superPool())  
>> C does some validation on the HttpResponse but leaves the ResponseEntity 
>> alone  
>> D uses flatMapConcat to emit the ResponseEntity ByteString Sources  
>> E Collects the ResponseEntity ByteStrings into a single chunk  
>> F further processes the ByteString
>>
>> Which all works fine if the graph completes successfully.  However if 
>> stage F fails and fails the graph then one connection is never released and 
>> eventually a materialization of the graph stalls forever waiting for stage 
>> B to process a request.
>>
>> What I believe is happening is that when stage F fails, the 
>> ResponseEntity Source in stage C has not been sinked and so the connection 
>> it occupies is not released.
>>
>> Is there a way to sink that ResponseEntity source on graph failure or 
>> alternatively, is there a better way to push a series of HttpRequests 
>> through a superPool that is aware of the entityBody and sinks on failure?
>>
>> -- 
>> >>>>>>>>>> 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 https://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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to