[Backgroundrb-devel] Backgroundrb-devel Digest, Vol 9, Issue 1

Ezra Zygmuntowicz ezmobius at gmail.com
Sat Feb 3 18:46:57 EST 2007


On Feb 3, 2007, at 2:51 PM, Stephen Weiss wrote:

> Hi Bill,
> I have "version 1" backgroundrb running on my development server with
> rails 1.2.1, with no issues (other than the left over DB connections
> blocking up my MySQL server, which isn't exactly a new problem).
> Going to move production servers to rails 1.2.1 very soon, I'll post
> back if there's any trouble.

In version 1 of the plugin you need to call  
ActiveRecord::Base.connection.disconnect!  as the last thing your  
worker does or when it's done with the database. This will not affect  
the other db handles as it only disconnects the db handle for the  
thread your worker is running in.
> Really, any advice at all...  if someone with Mac OS X 10.4 has
> gotten version 2 to work, and you could just post all the version
> numbers on the gcc, ruby, etc that you use with it, my database, my
> users and I would be so very grateful.
> --
> Steve

ez ez $ ruby -v
ruby 1.8.5 (2006-08-25) [i686-darwin8.7.1]
ez ez $ gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5363.obj~28/src/configure -- 
disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with- 
slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona -- 
with-tune=generic --program-prefix= --host=i686-apple-darwin8 -- 
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5363)
ez ez $ uname -a
Darwin ezra-zygmuntowiczs-computer.local 8.8.1 Darwin Kernel Version  
8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/ 
RELEASE_I386 i386 i386
ez ez $ gem list slave

*** LOCAL GEMS ***

slave (1.2.0, 1.0.0)
ez ez $ gem list daemons

*** LOCAL GEMS ***

daemons (1.0.3, 1.0.2, 0.4.2)
     A toolkit to create and control daemons in different ways

Sorry you are having trouble Steve. Admitedly Backgroundrb0.2.x  
branch does still have some problems but it does work very well once  
you tame it. That being said I have had zero time to work on bdrb in  
the last few months./ skaar did a ton of great work on this new  
architecture. But he and I have always said that 0.3.x will be the  
stable release of the new architecture.

I hope to have some time soon to go over the 0.2.x branch and fix any  
issues people are having. I also think that the old way of doing jobs  
has its place. So I may release a trimmed down refactored version of  
the original plugin. The thrteaded approach is fast to spawn jobs and  
if you are doing small tasks like cleaning sessions and working with  
rss of csv files then the old way is faster to spawn workers. The new  
slave architecture is for higher volume processing with long lived  

All that being said, if anyone wants to step up and help fix problems  
with either version of the plugin then I welcome you and I love  
patches ;)

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

More information about the Backgroundrb-devel mailing list