Re: [akka-user] Re: Memory leak somehow related to ask pattern

2015-03-31 Thread Viktor Klang
Wow, what an amazing catch!

On Tue, Mar 31, 2015 at 1:01 AM, Konrad Malawski <
konrad.malaw...@typesafe.com> wrote:

> Hi guys,
> quick update on the topic.
> It has indeed uncovered a bug in the PromiseActorRef.
> It does handle sending Termination properly, but did so with a mistaken
> actor in the Terminated(…) message, thus you wouldn’t get the Terminated
> you were waiting for, and the above explanation of Yaroslav completes the
> rest of the story.
>
> The fix is in this PR since today morning:
> https://github.com/akka/akka/pull/17102
> 
>
> Thanks for notifying us that something is fishy around there!
>
> --
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka  @ Typesafe 
>
> On 29 March 2015 at 09:33:49, Yaroslav Klymko (t3h...@gmail.com) wrote:
>
> So PrmiseActorRef is leaking and keeps reference on Promise &
> WriteEventsCompleted, still I'm not able to find a combination of
> dispatchers/actors to reproduce on simple example.
>
> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>>
>> Hi guys,
>> I have a very strange problem, it was originally spotted by @gfduszynski
>>  https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>>
>> Here is a problematic line of code
>>  https://github.com/EventStore/EventStore.Akka.Persistence/
>> blob/v2.0.0/src/main/scala/akka/persistence/eventstore/
>> journal/EventStoreJournal.scala#L28
>>
>> Basically it is a *actor ? WriteEvents* which returns
>> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages
>> are leaking, however *actor ! WriteEvents* is not leaking...
>> Also I couldn't reproduce this using simple app without akka persistence.
>>
>>  I will really appreciate any help, any ideas.
>> Thanks!
>>
>>
>>
>>
>> 
>>
>>
>>
>> 
>>
>>
>>
>>   --
> >> 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 http://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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Memory leak somehow related to ask pattern

2015-03-30 Thread Konrad Malawski
Hi guys,
quick update on the topic. 
It has indeed uncovered a bug in the PromiseActorRef.
It does handle sending Termination properly, but did so with a mistaken actor 
in the Terminated(…) message, thus you wouldn’t get the Terminated you were 
waiting for, and the above explanation of Yaroslav completes the rest of the 
story.

The fix is in this PR since today morning: 
https://github.com/akka/akka/pull/17102 

Thanks for notifying us that something is fishy around there!

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Typesafe

On 29 March 2015 at 09:33:49, Yaroslav Klymko (t3h...@gmail.com) wrote:

So PrmiseActorRef is leaking and keeps reference on Promise & 
WriteEventsCompleted, still I'm not able to find a combination of 
dispatchers/actors to reproduce on simple example.

On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
Hi guys,
I have a very strange problem, it was originally spotted by @gfduszynski
https://github.com/EventStore/EventStore.Akka.Persistence/issues/11

Here is a problematic line of code 
https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28

Basically it is a actor ? WriteEvents which returns 
Future[WriteEventsCompleted], these WriteEventsCompleted messages are leaking, 
however actor ! WriteEvents is not leaking...
Also I couldn't reproduce this using simple app without akka persistence.

 I will really appreciate any help, any ideas.
Thanks!



  



  




--
>> 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 http://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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-30 Thread Reid Spencer
Oh, wait. I think I see what you mean. You mean the Actor that is the 
sender of the ask to which the response is made. You are doing a watch on 
that, which is what you're noticing. You may well have found a leak.

On Monday, March 30, 2015 at 6:56:29 PM UTC-4, Reid Spencer wrote:
>
> Yaroslav,
>
> Under what condition would the single actor in your test program be 
> terminated. The Terminated message is only sent when the actor is 
> terminated but I see in your code no possibility of the actor ever being 
> terminated.
>
> On Monday, March 30, 2015 at 12:40:37 AM UTC-4, Yaroslav Klymko wrote:
>>
>> Hi Reid, 
>> I opened an issue on github regarding this: 
>> https://github.com/akka/akka/issues/17087
>> The problem as I can see it is in the no Terminated messages sent by 
>> PromiseActorRef, thus these actor get watched forever and not collected by 
>> gc.
>>
>> On Monday, March 30, 2015 at 12:53:35 AM UTC+3, Reid Spencer wrote:
>>>
>>> Yaroslav,
>>>
>>> The ask pattern doesn't execute synchronously but returns a Future[Any] 
>>> immediately, which your program is ignoring.  The future captures the 
>>> response from the actor at some future time (when the message send/reply is 
>>> complete). However, in your main program, that infinite loop is going to 
>>> many of those Future[Any] responses very quickly which will eventually 
>>> exhaust memory or overflow the message buffer. All those created future 
>>> objects aren't leaks per se as much as they are being created so fast that 
>>> the garbage collector has trouble keeping up with it. 
>>>
>>> If you wanted to make those calls synchronous, you should use the 
>>> Await.result idiom by changing the loop to:
>>>
>>> while (true) {
>>>   val future = actor ? "Request"
>>>   val result = Await.result(future, timeout.duration)
>>>   assert(result == "Response")
>>> }
>>>
>>>
>>> Hope that helps.
>>>
>>> Reid.
>>>
>>> On Sunday, March 29, 2015 at 5:04:50 AM UTC-4, Yaroslav Klymko wrote:

 The minimal app to reproduce this:

 import akka.actor.{Actor, ActorSystem, Props}
 import akka.pattern.ask
 import akka.util.Timeout
 import scala.concurrent.duration._

 object MemoryLeakApp extends App {
   val system = ActorSystem()
   val actor = system.actorOf(Props[MyActor])
   implicit val timeout = Timeout(3.seconds)
   while (true) {
 actor ? "Request"
   }
 }

 class MyActor extends Actor {
   def receive = {
 case _ =>
   val actor = sender()
   context.watch(actor)
   actor ! "Response"
   }
 }


 On Sunday, March 29, 2015 at 12:03:43 PM UTC+3, Yaroslav Klymko wrote:
>
> Hi guys,
> Root cause of my issue has been found, in short it is caused by *context 
> watch sender()*, where the sender is PrmiseActorRef.
>
>
> On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:
>>
>> So PrmiseActorRef is leaking and keeps reference on Promise & 
>> WriteEventsCompleted, still I'm not able to find a combination of 
>> dispatchers/actors to reproduce on simple example.
>>
>> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko 
>> wrote:
>>>
>>> Hi guys,
>>> I have a very strange problem, it was originally spotted by 
>>> @gfduszynski
>>> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>>>
>>> Here is a problematic line of code 
>>>
>>> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>>>
>>> Basically it is a *actor ? WriteEvents* which returns 
>>> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
>>> are leaking, however *actor ! WriteEvents *is not leaking...
>>> Also I couldn't reproduce this using simple app without akka 
>>> persistence.
>>>
>>>  I will really appreciate any help, any ideas.
>>> Thanks!
>>>
>>>
>>>
>>>
>>> 
>>>
>>>
>>>
>>> 
>>>
>>>
>>>
>>>

-- 
>>  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 http://groups.google.com/group/akka-

[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-30 Thread Reid Spencer
Yaroslav,

Under what condition would the single actor in your test program be 
terminated. The Terminated message is only sent when the actor is 
terminated but I see in your code no possibility of the actor ever being 
terminated.

On Monday, March 30, 2015 at 12:40:37 AM UTC-4, Yaroslav Klymko wrote:
>
> Hi Reid, 
> I opened an issue on github regarding this: 
> https://github.com/akka/akka/issues/17087
> The problem as I can see it is in the no Terminated messages sent by 
> PromiseActorRef, thus these actor get watched forever and not collected by 
> gc.
>
> On Monday, March 30, 2015 at 12:53:35 AM UTC+3, Reid Spencer wrote:
>>
>> Yaroslav,
>>
>> The ask pattern doesn't execute synchronously but returns a Future[Any] 
>> immediately, which your program is ignoring.  The future captures the 
>> response from the actor at some future time (when the message send/reply is 
>> complete). However, in your main program, that infinite loop is going to 
>> many of those Future[Any] responses very quickly which will eventually 
>> exhaust memory or overflow the message buffer. All those created future 
>> objects aren't leaks per se as much as they are being created so fast that 
>> the garbage collector has trouble keeping up with it. 
>>
>> If you wanted to make those calls synchronous, you should use the 
>> Await.result idiom by changing the loop to:
>>
>> while (true) {
>>   val future = actor ? "Request"
>>   val result = Await.result(future, timeout.duration)
>>   assert(result == "Response")
>> }
>>
>>
>> Hope that helps.
>>
>> Reid.
>>
>> On Sunday, March 29, 2015 at 5:04:50 AM UTC-4, Yaroslav Klymko wrote:
>>>
>>> The minimal app to reproduce this:
>>>
>>> import akka.actor.{Actor, ActorSystem, Props}
>>> import akka.pattern.ask
>>> import akka.util.Timeout
>>> import scala.concurrent.duration._
>>>
>>> object MemoryLeakApp extends App {
>>>   val system = ActorSystem()
>>>   val actor = system.actorOf(Props[MyActor])
>>>   implicit val timeout = Timeout(3.seconds)
>>>   while (true) {
>>> actor ? "Request"
>>>   }
>>> }
>>>
>>> class MyActor extends Actor {
>>>   def receive = {
>>> case _ =>
>>>   val actor = sender()
>>>   context.watch(actor)
>>>   actor ! "Response"
>>>   }
>>> }
>>>
>>>
>>> On Sunday, March 29, 2015 at 12:03:43 PM UTC+3, Yaroslav Klymko wrote:

 Hi guys,
 Root cause of my issue has been found, in short it is caused by *context 
 watch sender()*, where the sender is PrmiseActorRef.


 On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:
>
> So PrmiseActorRef is leaking and keeps reference on Promise & 
> WriteEventsCompleted, still I'm not able to find a combination of 
> dispatchers/actors to reproduce on simple example.
>
> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>>
>> Hi guys,
>> I have a very strange problem, it was originally spotted by 
>> @gfduszynski
>> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>>
>> Here is a problematic line of code 
>>
>> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>>
>> Basically it is a *actor ? WriteEvents* which returns 
>> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
>> are leaking, however *actor ! WriteEvents *is not leaking...
>> Also I couldn't reproduce this using simple app without akka 
>> persistence.
>>
>>  I will really appreciate any help, any ideas.
>> Thanks!
>>
>>
>>
>>
>> 
>>
>>
>>
>> 
>>
>>
>>
>>

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-29 Thread Yaroslav Klymko
Hi Reid, 
I opened an issue on github regarding 
this: https://github.com/akka/akka/issues/17087
The problem as I can see it is in the no Terminated messages sent by 
PromiseActorRef, thus these actor get watched forever and not collected by 
gc.

On Monday, March 30, 2015 at 12:53:35 AM UTC+3, Reid Spencer wrote:
>
> Yaroslav,
>
> The ask pattern doesn't execute synchronously but returns a Future[Any] 
> immediately, which your program is ignoring.  The future captures the 
> response from the actor at some future time (when the message send/reply is 
> complete). However, in your main program, that infinite loop is going to 
> many of those Future[Any] responses very quickly which will eventually 
> exhaust memory or overflow the message buffer. All those created future 
> objects aren't leaks per se as much as they are being created so fast that 
> the garbage collector has trouble keeping up with it. 
>
> If you wanted to make those calls synchronous, you should use the 
> Await.result idiom by changing the loop to:
>
> while (true) {
>   val future = actor ? "Request"
>   val result = Await.result(future, timeout.duration)
>   assert(result == "Response")
> }
>
>
> Hope that helps.
>
> Reid.
>
> On Sunday, March 29, 2015 at 5:04:50 AM UTC-4, Yaroslav Klymko wrote:
>>
>> The minimal app to reproduce this:
>>
>> import akka.actor.{Actor, ActorSystem, Props}
>> import akka.pattern.ask
>> import akka.util.Timeout
>> import scala.concurrent.duration._
>>
>> object MemoryLeakApp extends App {
>>   val system = ActorSystem()
>>   val actor = system.actorOf(Props[MyActor])
>>   implicit val timeout = Timeout(3.seconds)
>>   while (true) {
>> actor ? "Request"
>>   }
>> }
>>
>> class MyActor extends Actor {
>>   def receive = {
>> case _ =>
>>   val actor = sender()
>>   context.watch(actor)
>>   actor ! "Response"
>>   }
>> }
>>
>>
>> On Sunday, March 29, 2015 at 12:03:43 PM UTC+3, Yaroslav Klymko wrote:
>>>
>>> Hi guys,
>>> Root cause of my issue has been found, in short it is caused by *context 
>>> watch sender()*, where the sender is PrmiseActorRef.
>>>
>>>
>>> On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:

 So PrmiseActorRef is leaking and keeps reference on Promise & 
 WriteEventsCompleted, still I'm not able to find a combination of 
 dispatchers/actors to reproduce on simple example.

 On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>
> Hi guys,
> I have a very strange problem, it was originally spotted by 
> @gfduszynski
> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>
> Here is a problematic line of code 
>
> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>
> Basically it is a *actor ? WriteEvents* which returns 
> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
> are leaking, however *actor ! WriteEvents *is not leaking...
> Also I couldn't reproduce this using simple app without akka 
> persistence.
>
>  I will really appreciate any help, any ideas.
> Thanks!
>
>
>
>
> 
>
>
>
> 
>
>
>
>

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-29 Thread Reid Spencer
Yaroslav,

The ask pattern doesn't execute synchronously but returns a Future[Any] 
immediately, which your program is ignoring.  The future captures the 
response from the actor at some future time (when the message send/reply is 
complete). However, in your main program, that infinite loop is going to 
many of those Future[Any] responses very quickly which will eventually 
exhaust memory or overflow the message buffer. All those created future 
objects aren't leaks per se as much as they are being created so fast that 
the garbage collector has trouble keeping up with it. 

If you wanted to make those calls synchronous, you should use the 
Await.result idiom by changing the loop to:

while (true) {
  val future = actor ? "Request"
  val result = Await.result(future, timeout.duration)
  assert(result == "Response")
}


Hope that helps.

Reid.

On Sunday, March 29, 2015 at 5:04:50 AM UTC-4, Yaroslav Klymko wrote:
>
> The minimal app to reproduce this:
>
> import akka.actor.{Actor, ActorSystem, Props}
> import akka.pattern.ask
> import akka.util.Timeout
> import scala.concurrent.duration._
>
> object MemoryLeakApp extends App {
>   val system = ActorSystem()
>   val actor = system.actorOf(Props[MyActor])
>   implicit val timeout = Timeout(3.seconds)
>   while (true) {
> actor ? "Request"
>   }
> }
>
> class MyActor extends Actor {
>   def receive = {
> case _ =>
>   val actor = sender()
>   context.watch(actor)
>   actor ! "Response"
>   }
> }
>
>
> On Sunday, March 29, 2015 at 12:03:43 PM UTC+3, Yaroslav Klymko wrote:
>>
>> Hi guys,
>> Root cause of my issue has been found, in short it is caused by *context 
>> watch sender()*, where the sender is PrmiseActorRef.
>>
>>
>> On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:
>>>
>>> So PrmiseActorRef is leaking and keeps reference on Promise & 
>>> WriteEventsCompleted, still I'm not able to find a combination of 
>>> dispatchers/actors to reproduce on simple example.
>>>
>>> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:

 Hi guys,
 I have a very strange problem, it was originally spotted by @gfduszynski
 https://github.com/EventStore/EventStore.Akka.Persistence/issues/11

 Here is a problematic line of code 

 https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28

 Basically it is a *actor ? WriteEvents* which returns 
 *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
 are leaking, however *actor ! WriteEvents *is not leaking...
 Also I couldn't reproduce this using simple app without akka 
 persistence.

  I will really appreciate any help, any ideas.
 Thanks!




 



 





-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-29 Thread Yaroslav Klymko
The minimal app to reproduce this:

import akka.actor.{Actor, ActorSystem, Props}
import akka.pattern.ask
import akka.util.Timeout
import scala.concurrent.duration._

object MemoryLeakApp extends App {
  val system = ActorSystem()
  val actor = system.actorOf(Props[MyActor])
  implicit val timeout = Timeout(3.seconds)
  while (true) {
actor ? "Request"
  }
}

class MyActor extends Actor {
  def receive = {
case _ =>
  val actor = sender()
  context.watch(actor)
  actor ! "Response"
  }
}


On Sunday, March 29, 2015 at 12:03:43 PM UTC+3, Yaroslav Klymko wrote:
>
> Hi guys,
> Root cause of my issue has been found, in short it is caused by *context 
> watch sender()*, where the sender is PrmiseActorRef.
>
>
> On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:
>>
>> So PrmiseActorRef is leaking and keeps reference on Promise & 
>> WriteEventsCompleted, still I'm not able to find a combination of 
>> dispatchers/actors to reproduce on simple example.
>>
>> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>>>
>>> Hi guys,
>>> I have a very strange problem, it was originally spotted by @gfduszynski
>>> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>>>
>>> Here is a problematic line of code 
>>>
>>> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>>>
>>> Basically it is a *actor ? WriteEvents* which returns 
>>> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
>>> are leaking, however *actor ! WriteEvents *is not leaking...
>>> Also I couldn't reproduce this using simple app without akka persistence.
>>>
>>>  I will really appreciate any help, any ideas.
>>> Thanks!
>>>
>>>
>>>
>>>
>>> 
>>>
>>>
>>>
>>> 
>>>
>>>
>>>
>>>

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-29 Thread Yaroslav Klymko
Hi guys,
Root cause of my issue has been found, in short it is caused by *context 
watch sender()*, where the sender is PrmiseActorRef.


On Sunday, March 29, 2015 at 10:33:47 AM UTC+3, Yaroslav Klymko wrote:
>
> So PrmiseActorRef is leaking and keeps reference on Promise & 
> WriteEventsCompleted, still I'm not able to find a combination of 
> dispatchers/actors to reproduce on simple example.
>
> On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>>
>> Hi guys,
>> I have a very strange problem, it was originally spotted by @gfduszynski
>> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>>
>> Here is a problematic line of code 
>>
>> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>>
>> Basically it is a *actor ? WriteEvents* which returns 
>> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages 
>> are leaking, however *actor ! WriteEvents *is not leaking...
>> Also I couldn't reproduce this using simple app without akka persistence.
>>
>>  I will really appreciate any help, any ideas.
>> Thanks!
>>
>>
>>
>>
>> 
>>
>>
>>
>> 
>>
>>
>>
>>

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Memory leak somehow related to ask pattern

2015-03-29 Thread Yaroslav Klymko
So PrmiseActorRef is leaking and keeps reference on Promise & 
WriteEventsCompleted, still I'm not able to find a combination of 
dispatchers/actors to reproduce on simple example.

On Saturday, March 28, 2015 at 9:33:15 PM UTC+2, Yaroslav Klymko wrote:
>
> Hi guys,
> I have a very strange problem, it was originally spotted by @gfduszynski
> https://github.com/EventStore/EventStore.Akka.Persistence/issues/11
>
> Here is a problematic line of code 
>
> https://github.com/EventStore/EventStore.Akka.Persistence/blob/v2.0.0/src/main/scala/akka/persistence/eventstore/journal/EventStoreJournal.scala#L28
>
> Basically it is a *actor ? WriteEvents* which returns 
> *Future[WriteEventsCompleted]*, these *WriteEventsCompleted* messages are 
> leaking, however *actor ! WriteEvents *is not leaking...
> Also I couldn't reproduce this using simple app without akka persistence.
>
>  I will really appreciate any help, any ideas.
> Thanks!
>
>
>
>
> 
>
>
>
> 
>
>
>
>

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.