Hi,
I am experiencing the same problem. My graph randomly suspends many minutes
after starting and waits forever. I see the same log and think that it may
be related to the problem. The code below retries requests indefinitely.
But it seems that in some situations Future does not fail but just blocks.
Http(context.system).singleRequest(request).flatMap { response =>
Unmarshal(response.entity).to[Result]
}.pipeTo(self).onFailure {
case cause: Throwable =>
log.error(cause, "Error in request. Retrying {}.", id)
self ! DoRequest
}
And here is the log:
[DEBUG] [08/24/2015 14:03:47.545]
[default-akka.actor.default-dispatcher-13]
[akka://default/user/$a/flow-7-2-actorPublisherSource-actorPublisherSource/$a/flow-11501-4-publisherSource-prefixAndTail]
Cancelling a
kka.stream.impl.MultiStreamOutputProcessor$SubstreamOutput@4ee7da5d (after:
41000 ms)
Any ideas?
On Sunday, June 7, 2015 at 2:46:12 PM UTC+3, Akka Team wrote:
>
> Hi,
>
> This error message means that there were substreams that were not consumed
> by anyone and therefore have been lingering around until that timeout
> triggers. Can you pack up a small reproducer for this? Because if this is a
> bug this can cause some weird behavior, as substreams constructed by HTTP
> are all reading from the TCP connection in the end, so if there is noone
> consuming them that means they will stall the TCP connection until that
> timeout triggers.
>
> Can you file a ticket, and attach a small reproducer if possible?
>
> -Endre
>
> On Fri, Jun 5, 2015 at 7:53 PM, Jason Bass <[email protected]
> <javascript:>> wrote:
>
>> Hi, I ran into a problem where I was seeing the same message. It appears
>> to be a timeout that defaults to 5 seconds. I was able to get past this by
>> configuring a longer timeout. E.g.,
>>
>> akka {
>> stream {
>> materializer {
>> subscription-timeout {
>> timeout=30s
>> }
>> }
>> }
>> }
>>
>> Hope that helps.
>>
>> Jason
>>
>>
>> On Monday, June 1, 2015 at 3:05:41 PM UTC-4, Dana Peele wrote:
>>
>>> Hi,
>>>
>>> I'm running a simple http server:
>>>
>>> Http().bindAndHandle(routes, config.getString("http.interface"),
>>> config.getInt("http.port"))
>>>
>>> Here is my routes object:
>>>
>>> val routes =
>>> get {
>>> path("reactive-inventory" / Segment) {
>>> sku =>
>>> //Send a callback to complete the response for this request to
>>> a Receptionist
>>>
>>> completeWith[InventoryResponse](implicitly[ToResponseMarshaller[InventoryResponse]])
>>>
>>> {
>>> completer: (InventoryResponse => Unit) =>
>>> receptionistRouter ! GetRequest(sku, completer)
>>> }
>>> }
>>> } ~
>>> put {
>>> path("reactive-inventory" / Segment / Segment) {
>>> (sku, quantity) =>
>>> //Send a callback to complete the response for this request
>>> to a Receptionist
>>>
>>> completeWith[InventoryResponse](implicitly[ToResponseMarshaller[InventoryResponse]])
>>>
>>> {
>>> completer: (InventoryResponse => Unit) =>
>>> receptionistRouter ! PutRequest(sku, quantity.toInt,
>>> completer)
>>> }
>>> }
>>> } ~ {
>>> complete {
>>> InventoryResponse(0, "", "", success = false, 0, "404- Route
>>> unknown")
>>> }
>>> }
>>>
>>> And I'm seeing the following messages in my debug output:
>>>
>>> [DEBUG] [06/01/2015 14:14:57.022]
>>> [ReactiveInventory-akka.actor.default-dispatcher-38]
>>> [akka://ReactiveInventory/user/$a/flow-52168-3-publisherSource-prefixAndTail]
>>>
>>> Cancelling
>>> akka.stream.impl.MultiStreamOutputProcessor$SubstreamOutput@50715a30
>>> (after: 5000 ms)
>>>
>>> Can someone please explain what is going on here and how (or if I need
>>> to) correct this?
>>>
>>> Thanks!
>>>
>>> Dana
>>>
>> --
>> >>>>>>>>>> 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.