Hi Nic, that is indeed a little strange; my prime suspicion would be that you are leaking some Flows or Actors, but I didn’t see something obvious sticking out when skimming your code. You could check normal JVM stats (number of threads, GC activity, jmap) in order to see what accumulates over time. Have you tried enabling all logging options you can find in the stream and HTTP reference.conf files?
Regards, Roland On Wed, Aug 12, 2015 at 9:36 PM, Nicolau Werneck <nwern...@gmail.com> wrote: > I have created this bot to prank my friends, and study some Akka in the > process. But I am having a problem that I am unable to solve, so I was > hoping someone might have a clue. > > The code is at https://github.com/nlw0/hackfm . What it does is to enter > a page that has a simple pool, fetch current results, then vote on a > certain entry so it stays as the first place. Such fun! > > The program consists of three actors. The frist is `WebpageRequester`, > which receives periodically a `RequestWebpage` message to signal a new > iteration. It starts the fetching of a webpage via akka-http, and the > result is sent via `pipeTo` to a `WebpageProcessor` actor. > > `WebpageProcessor` parses the requested webpage, then processes the data, > and decides how many new votes must be cast. This command is sent to > another actor, a `FuncmesVoter`, which performs one http POST request for > each vote. > > Now what is happening is that the system works fine at first. It performs > all the necessary requests, and the logic is perfect. The iterations are > scheduled to happen every 10 seconds. But then after a couple of hours up > and running, it appears something near the first http request stops > working. Like the first http request flow is created, but they never > completes. And I don't get any kind of error messages. I am even waiting > for `Status.Failure` at the processor, but nothing arrives. The logs only > show the messages of the beginning of new iterations. And if I stop and > restart the program, it's back to normal. > > So, something between the first http request and the second actor > receiving the future response is breaking silently... How do I even debug > this? I was upset, because that is not a very robust system... Even if I > did something wrong, there should be a way to diagnose it. Or it could be > some nasty bug... > > I tried to replicate the problem with a simpler program, fetching and > parsing a news site periodically, but I was unable to do it, in that case > it worked perfectly. > > Any help is appreciated... Also any suggestions of how to change the > architecture. Maybe this stream creation with the result piped to an actor > was not a good choice? > > Thanks, > > ++nic > > -- > >>>>>>>>>> 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 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 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.