# Ruby server restart

**URL:** <https://www.ruby-forum.com/t/ruby-server-restart/90983>\
**Category:** Deployment\
**Created:** [April 3, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/ruby-server-restart/90983 "2007-04-03T16:20:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [April 3, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/ruby-server-restart/90983/1 "2007-04-03T16:20:18Z")

</div>

I am using Rails 1.1.6, with Oracle 10g db. I’m having a problem where  
multiple Oracle sessions are starting up in Oracle when I connect to my  
Rails site. The user will connect through the browser and a session is  
started. If the user closes the browser and then later comes back to the  
site, a new session is started. The old session is never closed. This  
can be annoying if there many users.

Our DBA says to restart the Ruby server to remove those inactive old  
sessions. I have Rails set up through Apache2.2+FastCGI. If I restart  
Apache, is that the equivalent of restarting the Ruby server? As far as  
I know, there is no Ruby server. Also, when I do restart the Apache, the  
Oracle sessions are not removed.

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [April 4, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/ruby-server-restart/90983/2 "2007-04-04T16:30:18Z")

</div>

Killing all the Ruby/FastCGI processes is what he wants you to do.

If you do a ‘ps -ef | grep fcgi’ should find you what you need to  
kill.

This is a band-aid though, I think there should be a way to time out  
those connections, but I’m not sure what it would be.

---

<div class="post-metadata">

**Author:** ![james](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@james](https://www.ruby-forum.com/u/james)\
**Post date:** [April 5, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/ruby-server-restart/90983/3 "2007-04-05T17:21:50Z")

</div>

Thank you Andrew. I read later that restarting Apache does not  
necessarily shutdown all the FastCGI servers. This can be seen in the  
fastcgi.crash.log file where the log will indicate that only one server  
has shutdown. The other servers need to be shutdown manually.

I am still looking into how to timeout connections also.

Thanks for your help!

James
