Hi Johannes,
Thank you for looking into that.
This is really surprising finding. I cannot find anything wrong with my
code though in this regards. There is one more materializer beining
initialized, but for an endpoint that is rarely used (Swagger docs - I have
verified in the logs, that there are only a few requests per day to that
one).
implicit val materializer = ActorMaterializer()
val bindingFuture: Future[Http.ServerBinding] =
Http().bindAndHandle(routes, host, port)
bindingFuture.onFailure {
case ex: Exception =>
logger.error(s"Failed to bind to $host, $port", ex)
}
On Wed, 27 Sep 2017 at 11:39 Johannes Rudolph <
[email protected]> wrote:
> Hi Bartosz,
>
> I had a quick look into the dump. It contains >317000 StreamSupervisors,
> so creating too many materializers is really the issue. Note, that the
> materializer itself might go out of scope but the engine still stays alive
> if the materializer has not been shutdown manually.
>
> I created https://github.com/akka/akka/issues/23736 to discuss if we
> could warn if the `Materializer` reference is not referenced any more but
> the infrastructure is still alive.
>
> Johannes
>
>
>
> On Tue, Sep 26, 2017 at 1:59 PM, Bartosz Jankiewicz <
> [email protected]> wrote:
>
>> I have verified that but there are 2 places where declare the
>> materializers. Both are declared as vals. I will verify the number of
>> materializer instances on my heap-dump to confirm.
>>
>> On Tue, 26 Sep 2017 at 13:24 Johannes Rudolph <
>> [email protected]> wrote:
>>
>>> On Tue, Sep 26, 2017 at 7:18 AM, Patrik Nordwall <
>>> [email protected]> wrote:
>>>
>>>> If the names are StreamSupervisor- I think it can be that a new
>>>> Materializer is created for each request. I don’t know if that is done by
>>>> your application or by Akka Http. Does that ring any bells? Do you have any
>>>> creation of stream materializers in your code?
>>>>
>>>>
>>> Ah good point. I just assumed that it would be child actors of the
>>> supervisor since they also have that in the name but if it's the supervisor
>>> itself, creating too many Materializers could really be the cause.
>>>
>>> Johannes
>>>
>>>
>>> --
>>> >>>>>>>>>> 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
>>> [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.
>>>
>> --
>> >>>>>>>>>> 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
>> [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.
>>
>
> --
> >>>>>>>>>> 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
> [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.
>
--
>>>>>>>>>> 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.