From: Tim Pease Date: 2006-07-25T22:36:36+09:00 Subject: Re: druby - How to close connection from client? On 7/25/06, Martin Boese wrote: > I need to disconnect explicitly from a druby client. > > My code is like: > > DRb.start_service > @drb = DRbObject.new(nil, 'druby://localhost:7777') > @drb.dosomething(param1, param2, param3) > ...(here I'd like to disconnect!!)... DRb.stop_service You can make another call to DRb.start_service if you want to restart your DRb connection. You'll have to create another DRbObject, though, since stop_service terminates all connections. Blessings, TwP > > Background: > I am using druby to communicate between a Rails application running on > lighttpd/FreeBSD6 and a server-script running on the same box with different > user rights. > > I noticed that the longer I run the webserver the more sockets stay open, > "sockstat | grep ruby" gives me hundreds of: > > > www ruby18 26179 10 tcp4 *:51359 *:* > > www ruby18 26179 11 tcp4 *:57690 *:* > > www ruby18 26179 12 tcp4 *:53473 *:* > > I assume that every time I run the druby client on the website a connection > remains open. They get all cleared if I restart lighttpd. > > Thanks. > martin > > >