Precisely - I simplified the solution to eliminate all possible causes. As
mentioned, I don't use actors anywhere except for this endpoint and
instances of ActorCell pollute the heap. I've tried profiling and the
observation is the same.

On Mon, 25 Sep 2017 at 12:29 Konrad Malawski <konrad.malaw...@typesafe.com>
wrote:

> This code seems unlikely to be the cause, likely somewhere else - run your
> app while profiling to find the leak.
>
> On Mon, Sep 25, 2017 at 7:26 PM, Bartosz Jankiewicz <
> bartosz.jankiew...@gmail.com> wrote:
>
>> Indeed, this is what it looks like :)
>>
>> The only place where I use actors is in Akka Http routes. The service I'm
>> using returns a future. The only clue I had was that the Future results
>> returned from my service never evaluate could cause the stream workers to
>> stack. But in such case I should also spot large number of Future objects
>> on the heap but I don't observe that.
>>
>> def campaign(): Route =
>>     path("campaign") {
>>       get {
>>         withRequestTimeout(1 second) {
>>           parameters('cookieId, 'ip, 'debug.?) { (cookieId, ip, debug) =>
>>             val verbose = debug match {
>>               case Some("missingCampaigns") => true
>>               case _ => false
>>             }
>>             val resultF: Future[EvaluationResult] =
>> Free.liftF(EvaluateCampaign(cookieId, ip, verbose))
>>               .foldMap(evaluationService)
>>             onSuccess(resultF) { result =>
>>               complete(result)
>>             }
>>           }
>>         }
>>       }
>>     }
>>
>>
>>
>>
>> On Monday, 25 September 2017 11:01:08 UTC+2, Konrad Malawski wrote:
>>>
>>> What are you doing in the app ;-)
>>> Sounds to me like you’re starting tons of things that are never stopped.
>>>
>>> —
>>> Konrad `kto.so` Malawski
>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>>
>>> On 25 September 2017 at 17:38:57, Bartosz Jankiewicz (
>>> bartosz.j...@gmail.com) wrote:
>>>
>>> I have been running an app with Akka Http 1.0.9.
>>>
>>> It had only single endpoint respoding with JSON. The service returned
>>> the value as future therefore I used onComlete semantics.
>>>
>>> The app was consistently running into OoM issues. Heap dump analysis has
>>> led me to 1,536,693 instances of akka.actor.ActorCell. Along with
>>> accompanying objects (scala.collection.immutable.RedBlackTree$BlackTree)
>>>  it saturated the heap. All ActorCell objects seem to be related to
>>> Akka-Streams - their names are: StreamSupervisor-xxxxxx
>>>
>>> Has anyone fallen into a similar issue?
>>> --
>>> >>>>>>>>>> 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.
>>
>
>
>
> --
> Cheers,
> Konrad 'ktoso' Malawski
> Akka <http://akka.io/> @ Typesafe <http://typesafe.com/>
>
> --
> >>>>>>>>>> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/GSsa1akTdjQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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.

Reply via email to