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

hemant gethemant at gmail.com
Thu Jul 17 13:31:59 EDT 2008


On Thu, Jul 17, 2008 at 10:17 PM, Martin Honermeyer
<maze at strahlungsfrei.de> wrote:
> 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:

Please read below. There is no point in doing this kinda testing.

>
>>> 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

You have disabled logging, so no wonder your logs are clean. Also,
when you invoke some call on a non-existent worker in a synchronous
manner, call will obviously hang, because there is no worker that can
respond to request. What you do expect there?

However, if you have logging enabled and start backgroundrb with
"./scrip/backgroundrb start", you can see an exception about
non-existent worker logged in log files.


More information about the Backgroundrb-devel mailing list