Re: [akka-user] Akka HTTP Stream listener stops processing databytes after a while

2016-09-28 Thread Tal Beno
Thank you.

that was the reason:

EntityStreamSizeException: actual entity size (None) exceeded content 
length limit (8388608 bytes)! You can configure this by setting 
akka.http.[server|client].parsing.max-content-length or calling 
HttpEntity.withSizeLimit before materializing the dataBytes stream.

If I may ask, what is the best way to monitor akka please (free tools)?

On Wednesday, September 28, 2016 at 10:38:12 AM UTC-4, Konrad Malawski 
wrote:
>
> Add a log() stage to the flow.
>
> -- 
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 28 September 2016 at 14:21:28, Tal Beno (tal@gmail.com 
> ) wrote:
>
> I have an app which has 3 HTTP listeners like this one:
>
> val futureResponse1: Future[HttpResponse] =
>   Http().singleRequest(HttpRequest(uri = someUrl))
>
> each of the 3 is listening to a non stop stream (each to a different one). 
> And handles it with a simple flow that starts with grouping and then a 
> relatively fast processing (non-blocking):
>
> futureResponse1.flatMap {response =>
>   response.status match {
> case StatusCodes.OK =>
>   val source: Source[ByteString, Any] = response.entity.dataBytes
>   source.
> grouped(100). 
> map(doSomethingFast).
> runWith(Sink.ignore) 
>
> case notOK => system.log.info("failed opening, status: " + 
> notOK.toString())
>   }
>
> ...
>
> I get no exceptions or warnings. But after a while (could be 15-25 
> minutes) the listeners are just suddenly stopping. One after the other (not 
> together).
>
> Maybe its the grouped phase that is the problem there? Or maybe the 
> connection/stream just stops? Or the dispatcher that is shared by them is 
> getting starved / something not getting released.
>
> Any ideas why that may be happening please?
> --
> >> 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+...@googlegroups.com .
> To post to this group, send email to akka...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  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.


Re: [akka-user] Akka HTTP Stream listener stops processing databytes after a while

2016-09-28 Thread Konrad Malawski
Add a log() stage to the flow.

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 28 September 2016 at 14:21:28, Tal Beno (tal.b...@gmail.com) wrote:

I have an app which has 3 HTTP listeners like this one:

val futureResponse1: Future[HttpResponse] =
  Http().singleRequest(HttpRequest(uri = someUrl))

each of the 3 is listening to a non stop stream (each to a different one).
And handles it with a simple flow that starts with grouping and then a
relatively fast processing (non-blocking):

futureResponse1.flatMap {response =>
  response.status match {
case StatusCodes.OK =>
  val source: Source[ByteString, Any] = response.entity.dataBytes
  source.
grouped(100).
map(doSomethingFast).
runWith(Sink.ignore)

case notOK => system.log.info("failed opening, status: " + notOK.toString())
  }

...

I get no exceptions or warnings. But after a while (could be 15-25 minutes)
the listeners are just suddenly stopping. One after the other (not
together).

Maybe its the grouped phase that is the problem there? Or maybe the
connection/stream just stops? Or the dispatcher that is shared by them is
getting starved / something not getting released.

Any ideas why that may be happening please?
--
>> 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.

-- 
>>  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.