DaemonKit/Ruote/ActiveRecord Issue

43 views
Skip to first unread message

Farrel Lifson

unread,
Apr 15, 2011, 4:20:20 AM4/15/11
to daemo...@googlegroups.com
I've got DaemonKit and Ruote working nicely together (so far) but when I open up a database connection with ActiveRecord (3.0.6) in a file in the post_daemonize directory the Ruote Worker will not run in the libexec/daemon.rb. I assume there is some stepping on toes going on with Threads but I can't confirm it. There's nothing in the logs and no exceptions are thrown.

Does anyone with experience with ActiveRecord, Ruote and DaemonKit have any pointers on what could be going wrong and what needs to be done to get everything running smoothly?

Kenneth Kalmer

unread,
Apr 15, 2011, 6:31:13 AM4/15/11
to daemo...@googlegroups.com
Hi Farrel

Nothing obvious jumps out at me, I'll try and replicate the issue locally and get back to you.

Just curious, what Ruby version and OS are you testing on, and which MySQL gem are you using ?

Kind regards

On Fri, Apr 15, 2011 at 10:20 AM, Farrel Lifson <farrel...@gmail.com> wrote:
I've got DaemonKit and Ruote working nicely together (so far) but when I open up a database connection with ActiveRecord (3.0.6) in a file in the post_daemonize directory the Ruote Worker will not run in the libexec/daemon.rb. I assume there is some stepping on toes going on with Threads but I can't confirm it. There's nothing in the logs and no exceptions are thrown.

Does anyone with experience with ActiveRecord, Ruote and DaemonKit have any pointers on what could be going wrong and what needs to be done to get everything running smoothly?

--
You received this message because you are subscribed to the Google Groups "Daemon Kit" group.
To post to this group, send email to daemo...@googlegroups.com.
To unsubscribe from this group, send email to daemon-kit+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/daemon-kit?hl=en.



--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
@kennethkalmer

Farrel Lifson

unread,
Apr 15, 2011, 7:44:18 AM4/15/11
to daemo...@googlegroups.com
> Nothing obvious jumps out at me, I'll try and replicate the issue locally and get back to you.

I actually managed to get things working by starting from scratch with a new daemon-kit installation and carefully adding in Ruote and then ActiveRecord. I was initially modifying an existing daemon-kit example off the net and I think there might have been some code included in it that was causing the issue.

One thing I noticed now that it is running is that there is a significant delay between when doing queries. I have simple process

  repeat do
    a
    b
  end

withe a,b doing a count on a table in the database and logging it. I noticed that it will do 5 queries ( 2 1/2 loops) and then pause for a few seconds and then 5 more and the pause etc. This is I assumed was related to the ActiveRecord connection pool and when I set that to 1 it would pause every 1 query. Is this something to worry about or expected behaviour?

Reply all
Reply to author
Forward
0 new messages