Anything blocking I put on a pinned dispatcher. So each FileProcessor and the Controller (which sometimes does JDBC). Each FileProcessor also has a CircuitBreaker which uses the same pinned dispatcher as said FileProcessor.
Is there something wrong with this ? 2014-08-11 17:34 GMT+02:00 Patrik Nordwall <[email protected]>: > What dispatcher do you use for what? > You mentioned pinned dispatcher, but you also have context.dispatcher for > the circuit breaker. Pinned dispatcher there is probably not a good idea > since the actor is blocking (the thread is busy). > You also have futures, e.g. mapTo. > > /Patrik > > > On Mon, Aug 11, 2014 at 4:42 PM, Leonard Meyer <[email protected]> wrote: > >> Yes, all I have is at the beginning where it's basically saying who's >> supervising who. And I have : >> >> [DEBUG] [08/11/2014 16:36:41.977] [akka.actor.default-dispatcher-2] >> [akka://xxxx/user] now supervising >> Actor[akka://xxxxx/user/connectionFactory#608280561] >> >> connectionFactory is the name of my datasource actor. >> >> >> 2014-08-11 16:26 GMT+02:00 √iktor Ҡlang <[email protected]>: >> >>> Did you enable lifecycle logging? >>> >>> >>> On Mon, Aug 11, 2014 at 4:22 PM, Jasper <[email protected]> wrote: >>> >>>> Well, given what I said before, pretty sure yes. And yes the sender() >>>> doesn't receive anything so it times out and the circuit breaker keep on >>>> doing the Open/HalfOpen circle. Here are some sample logs >>>> <http://pastebin.com/TUPVMNNi> >>>> >>>> This is annoying, I don't know if I'm doing something wrong with Akka, >>>> Hikari or PostgreSQL. >>>> >>>> Le lundi 11 août 2014 15:55:19 UTC+2, √ a écrit : >>>>> >>>>> Hi Jasper, >>>>> >>>>> It wasn't dumb at all. >>>>> So are you sure that it doesn't blow up, because that would mean that >>>>> the sender() of GetConnection never gets his/her connection. Right? >>>>> >>>>> >>>>> On Mon, Aug 11, 2014 at 3:51 PM, Jasper <[email protected]> wrote: >>>>> >>>>>> Quick and dirty modification but indeed, that was dumb. >>>>>> >>>>>> Le lundi 11 août 2014 15:47:58 UTC+2, √ a écrit : >>>>>>> >>>>>>> Unrelated but why the complication of >>>>>>> >>>>>>> sender() ! datasource.map(ds => ds.getConnection).get >>>>>>> >>>>>>> iso >>>>>>> >>>>>>> sender() ! datasource.get.getConnection >>>>>>> >>>>>>> >>>>>>> On Mon, Aug 11, 2014 at 3:44 PM, Jasper <[email protected]> wrote: >>>>>>> >>>>>>>> Spent some time today on this... Actually when I turn on autocommit >>>>>>>> and crash the DB, processors do block but they ALL go into Open state, >>>>>>>> which is good. But for some reason my actor holding the datasource >>>>>>>> isn't >>>>>>>> responding anymore and I end up with this when asking for a connection >>>>>>>> : >>>>>>>> >>>>>>>> akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka: >>>>>>>> //catalinaSys/user/connectionFactory#-1136872742]] after [10000 ms] >>>>>>>> >>>>>>>> It isn't blowing up either because I don't have my hook log on >>>>>>>> restart (supervisor is the guardian here). What bugs me is HikariCP >>>>>>>> log : >>>>>>>> >>>>>>>> After cleanup pool stats HikariPool-0 (total=19, inUse=1, avail=18, >>>>>>>>> waiting=0) >>>>>>>>> >>>>>>>> >>>>>>>> So there are connections available but I get timeouts instead :( >>>>>>>> Here's how I do it : >>>>>>>> >>>>>>>> case GetConnection => sender() ! datasource.map(ds => ds. >>>>>>>> getConnection).get >>>>>>>> >>>>>>>> datasource is an Option[HikariDataSource], and if isn't there then >>>>>>>> it should just blow up and restart. >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>>>>>>> urrent/additional/faq.html >>>>>>>> >>>>>>>>>> Search the archives: https://groups.google.com/grou >>>>>>>> p/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 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 [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> 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 [email protected]. >>>> >>>> To post to this group, send email to [email protected]. >>>> 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 a topic in the >>> Google Groups "Akka User List" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/akka-user/Ehzioy3jVoU/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 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 [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > > -- > >>>>>>>>>> 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/Ehzioy3jVoU/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 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
