[Backgroundrb-devel] Stopping DRb after using BackgrounDRb::MiddleManDRbObject.init
Robert Bjarnason
robert.bjarnason at gmail.com
Fri Jan 19 18:37:33 EST 2007
Hi Ezra,
I would like to control which uri is used to start the DRb connection
for Rails based load-balancing purposes from multiple mongrels
connecting to multiple backgroundrbs running on several boxes. I don't
see how I could BackgrounDRb::MiddleManRailsProxy for this purpose. Any
ideas?
Thanks,
Robert
Ezra Zygmuntowicz wrote:
>
> Robert-
>
> Is there some reason that you are calling
> BackgrounDRb::MiddleManDRbObject.init directly? You should let the
> BackgrounDRb::MiddleManRailsProxy take care of that. If you run it the
> normal way then each mongrel will only make one connection to the drb
> server. If you keep calling BackgrounDRb::MiddleManDRbObject.init
> you are going to keep making more connections.
>
>
> -Ezra
>
> On Jan 19, 2007, at 3:08 PM, Robert Bjarnason wrote:
>
>> Hi Jacob,
>>
>> Each mongrel is constantly making new drb connections instead of reusing
>> or closing existing ones. Having N*M drb connections would not be a
>> problem.
>>
>> Thanks,
>> Robert
>>
>> Jacob Robbins wrote:
>>> Robert,
>>> Is there more than one drb connection from each mongrel? I would
>>> think that each rails app would have one drb connection to each of the
>>> backgroundrb servers that it has accessed.
>>>
>>> I'm not quite understanding what the problem is, is it that you have
>>> N mongrels and M backgroundrb serves and it's too much to have N*M drb
>>> connections? Or is it that each mongrel is constantly making more new
>>> drb connections instead of reusing the existing ones?
>>>
>>> -Jacob
>>>
>>>
>>>
>>> Michael D'Auria wrote:
>>>
>>>> You need to clean up your workers yourself, so toss in a self.delete
>>>> inside of the do_work method to have the worker clean up after
>>>> itself or
>>>> you can perform a delete on the worker on the outside using it's id.
>>>>
>>>> .: Michael :.
>>>>
>>>>
>>>> On 1/19/07, *Robert Bjarnason* <robert.bjarnason at gmail.com
>>>> <mailto:robert.bjarnason at gmail.com>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm having a problem where connections started through
>>>> BackgrounDRb::MiddleManDRbObject.init are not stopped,
>>>> resulting in an
>>>> ever growing established connections between my Mongrels and
>>>> remote
>>>> backgroundrbs
>>>>
>>>> I added DRb.stop_service to my code executed after requests
>>>> that init
>>>> MiddleManDRbObjects but that does not help.
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>> Robert Bjarnason
>>>>
>>>> _______________________________________________
>>>> Backgroundrb-devel mailing list
>>>> Backgroundrb-devel at rubyforge.org
>>>> <mailto:Backgroundrb-devel at rubyforge.org>
>>>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> Backgroundrb-devel mailing list
>>>> Backgroundrb-devel at rubyforge.org
>>>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>>>
>>>
>>> _______________________________________________
>>> Backgroundrb-devel mailing list
>>> Backgroundrb-devel at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>>
>>>
>>
>> _______________________________________________
>> Backgroundrb-devel mailing list
>> Backgroundrb-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
> -- 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