[Backgroundrb-devel] Cannot connect when spawning new workers on demand

hemant gethemant at gmail.com
Thu Jan 24 08:41:18 EST 2008


On Jan 24, 2008 5:28 PM, Ger Apeldoorn <gapeldoorn at wehkamp.nl> wrote:
> Hi,
>
> My apologies, as I didnt get any output from the ./script/backgroundrb
> in the console, I thought the debug log was the place to go.... (even
> with the :log: foreground in place)
>
> That said, the backgroundrb master process doesn't crash. After I get
> the 'cannot connect' error, I can push 'back' on my browser and try
> again with less servers successfully. Even an F5 so that all POST
> parameters are submitted again can succeed. (all without restarting
> anything)
>
> I hope this can shed some light.. :)

Okay, I further debugged this issue. The first Question is, are you
deleting the workers? In the first and second mail that you pasted, I
can't see any calls to either "exit" or MiddleMan.delete_worker().

What I found that, if you have too many workers running, even if
master doesn't die, bdrb master may refuse the connection. For me,
threshold was around 50 parallel workers on the same machine. I
couldn't find any fault in bdrb code, since I have 1 GB memory on this
machine and 50 parallel workers mean,  50*30 = 1500MB of memory.

Assuming other tasks running, available memory is around 600 MB or
something, and swapping brings my machine to a grinding hault.
So, its very important that you delete your worker. In worst case, if
you still can't solve the issue, just archive the your app and send me
( assuming its not too confidential, and you have reasonable amount of
trust on me).





-- 
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://gnufied.org


More information about the Backgroundrb-devel mailing list