# Check if server is alive in drb

**URL:** <https://rubytalk.org/t/check-if-server-is-alive-in-drb/40516>\
**Category:** ruby-talk\
**Created:** [10 September 2007 00:08 UTC](https://rubytalk.org/t/check-if-server-is-alive-in-drb/40516 "2007-09-10T00:08:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![a11](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/a11/32/8169_2.png) [@a11](https://rubytalk.org/u/a11)\
**Post date:** [10 September 2007 00:08 UTC](https://rubytalk.org/t/check-if-server-is-alive-in-drb/40516/1 "2007-09-10T00:08:57Z")

</div>

depending on how many clients there are each one can call a method on the server that never returns (Thread.sleep). if the method ever returns in the client it knows the server has died. this obviously only works for a small number of clients.

a @ [http://drawohara.com/](http://drawohara.com/)

> **···**
>
> On Aug 28, 2007, at 2:15 AM, Mr\_Tibs wrote:
> 
> > My server notifies my client when it finished a job through the  
> > observer method. However, it is possible that the server dies (or the  
> > network connection gets broken), and I need to detect this. I  
> > implemented a thread which continously "pings" (calls a simple  
> > remote\_obj.ping) and rescues any exceptions in this method call. Is  
> > there a better solution out there?
> 
> --  
> we can deny everything, except that we have the possibility of being better. simply reflect on that.  
> h.h. the 14th dalai lama

---

<div class="post-metadata">

**Author:** ![Marcin\_Raczkowski](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Marcin\_Raczkowski](https://rubytalk.org/u/Marcin_Raczkowski)\
**Post date:** [10 September 2007 06:27 UTC](https://rubytalk.org/t/check-if-server-is-alive-in-drb/40516/2 "2007-09-10T06:27:00Z")

</div>

ara.t.howard wrote:

> > My server notifies my client when it finished a job through the  
> > observer method. However, it is possible that the server dies (or the  
> > network connection gets broken), and I need to detect this. I  
> > implemented a thread which continously "pings" (calls a simple  
> > remote\_obj.ping) and rescues any exceptions in this method call. Is  
> > there a better solution out there?
> 
> depending on how many clients there are each one can call a method on the server that never returns (Thread.sleep). if the method ever returns in the client it knows the server has died. this obviously only works for a small number of clients.
> 
> a @ [http://drawohara.com/](http://drawohara.com/)  
> --  
> we can deny everything, except that we have the possibility of being better. simply reflect on that.  
> h.h. the 14th dalai lama

hmm that's good idea for keeping connections alive i guess 🙂 i had problems that frequent requests over ssl were making huge overhead.

> **···**
>
> > On Aug 28, 2007, at 2:15 AM, Mr\_Tibs wrote:
