[Backgroundrb-devel] Fwd: Method hangs for the first time if called synchronously

Martin Honermeyer maze at strahlungsfrei.de
Thu Jul 17 12:47:53 EDT 2008


I second that. I can remove all code from my worker so only the code from the 
generator is left.


It hangs even when calling a not-existing worker. From the Rails console:

>> MiddleMan.worker(:dfsfd)
=> #<BackgrounDRb::RailsWorkerProxy:0xb6af77e0 
@middle_man=#<BackgrounDRb::ClusterConnection:0xb76d06ac 
@backend_connections=[#<BackgrounDRb::Connection:0xb76d03b4 
@mutex=#<Mutex:0xb76d038c>, 
cluster_conn#<BackgrounDRb::ClusterConnection:0xb76d06ac ..., 
@server_port=11006, @server_ip="0.0.0.0", @connection_status=true>], 
request_count1, bdrb_servers[#<struct #<Class:0xb76d05e4 ip="0.0.0.0", 
port=11006], @round_robin=[0], @last_polled_time=Thu Jul 17 18:30:09 +0200 
2008, @disconnected_connections={}>, worker_keynil, tried_connections[], 
worker_name:dfsfd

>> MiddleMan.worker(:dfsfd).sdfsdf

(hangs)


I am calling from the console (didn't even try from within a controller). 
There is _nothing_ posted in the backgroundrb logs.

For me it seems like there is no connection to the backgroundrb server at all. 
I even rebooted the (Xen virtual Linux) machine, but the problem remains.


My background.yml:

---
:backgroundrb:
  :port: 11006
  :ip: 0.0.0.0
  :debug_log: false # whether to print debug logs to a seperate worker, 
defaults to true
  :log: foreground # will print log messages to STDOUT, defaults to seperate 
log worker


Martin


On Thursday 17 July 2008 18:22:34 you wrote:
> Hemant,
>
> As mentioned in my first email, this happens even when your worker has no
> code (or only a logger.info line) and no arguments passed. Nothing shows up
> in the log, it just hangs.
>
> Please refer to my first email and let me know if you have any additional
> questions.
>
> Thank you for helping us with this issue.
>
> Csongor
>
> On Thu, Jul 17, 2008 at 6:44 AM, hemant <gethemant at gmail.com> wrote:
> > On Thu, Jul 17, 2008 at 6:01 PM, Martin Honermeyer
> >
> > <maze at strahlungsfrei.de> wrote:
> > > Hello guys,
> > >
> > > I just installed Backgroundrb (SVN via piston, Packet gem 0.1.7) in my
> >
> > Rails
> >
> > > 2.1 project. As far as I can tell, I am experiencing exactly the same
> >
> > problem.
> >
> > > On Linux, that is (Ubuntu 8.04, Kernel 2.6.22-14-xen)!
> > >
> > > The first asynchronous worker calls (in console) worked. Then, after
> >
> > restarting
> >
> > > Backgroundrb and the console, Every synchronous call hangs at the same
> > > position as told by Jonathan. Asynchronous calls then have no effect
> >
> > either.
> >
> > > Hemant, I tried your patch, but it doesn't change anything for me. I
> > > will
> >
> > do
> >
> > > anything to help ;-/
> >
> > Okay. Can you pastie your worker code and rails/controller code, using
> > which you are invoking this methods. Also, please paste the code as
> > you are using. I will see, if I can reproduce this behaviour.
> >
> > Also, Check the logs. both backgroundrb_debug_11006.log and
> > backgroundrb_11006.log and if there is any exception there.
> >
> > Lastly, what exactly you are trying to send from your worker code? You
> > realize, not everything in ruby can be dumped across wire.
> > _______________________________________________
> > Backgroundrb-devel mailing list
> > Backgroundrb-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/backgroundrb-devel



More information about the Backgroundrb-devel mailing list