# Apache Takes 10mins to Reboot

**URL:** <https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469>\
**Category:** Rails\
**Created:** [July 14, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469 "2006-07-14T22:45:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwigal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jwigal](https://www.ruby-forum.com/u/jwigal)\
**Post date:** [July 14, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469/1 "2006-07-14T22:45:09Z")

</div>

I have 5 FastCgiServer processes running on my Rails app (specified in  
httpd.conf) in Apache 2. When I restart Apache - I timed it - it takes  
just over 10 minutes to reboot. What up with that?

The FastCgiServer processes also have the RAILS\_ENV variable set to  
production.

Of course, once it reboots the app is lightning fast and all is well.

Is this just something I have to deal with by using Apache/FastCGI?

---

<div class="post-metadata">

**Author:** ![jwigal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jwigal](https://www.ruby-forum.com/u/jwigal)\
**Post date:** [July 14, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469/2 "2006-07-14T23:04:42Z")

</div>

Are you on Linux or Windows? What are the specs on your server?

Why 5 dispatchers? Got a big app?

Apache will start all 5 ruby processes at the same time. On Linux, use  
TOP  
after you start Apache  
On Windows, use task manager.

This is why I don’t like FastCGI.

On 14 Jul 2006 20:45:24 -0000, Jeff W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![jwigal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jwigal](https://www.ruby-forum.com/u/jwigal)\
**Post date:** [July 29, 2006, 6:22am UTC](https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469/3 "2006-07-29T06:22:43Z")

</div>

I’m using 5 processes because eventually this will be a big app as it is  
a CMS that hosts many websites on one Rails application. Maybe I should  
set it to 2 processes for now and scale in a little while. But, making  
any changes in production is such a pain to do as I have to wait each  
time.

This is a dedicated server, Intel Celeron 1.3 GHZ, 512mb RAM. Running  
RHEL. I don’t know what TOP is so I’ll check that out.

Jeff

---

<div class="post-metadata">

**Author:** ![jwigal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jwigal](https://www.ruby-forum.com/u/jwigal)\
**Post date:** [July 29, 2006, 7:25pm UTC](https://www.ruby-forum.com/t/apache-takes-10mins-to-reboot/98469/4 "2006-07-29T19:25:29Z")

</div>

On 14 Jul 2006 20:45:24 -0000, Jeff W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have 5 FastCgiServer processes running on my Rails app (specified in  
> httpd.conf) in Apache 2. When I restart Apache - I timed it - it takes  
> just over 10 minutes to reboot. What up with that?
> 
> The FastCgiServer processes also have the RAILS\_ENV variable set to  
> production.
> 
> Of course, once it reboots the app is lightning fast and all is well.
> 
> Is this just something I have to deal with by using Apache/FastCGI?

That sounds a lot like apache timing out trying to do dns lookups.  
Do you see any “Can’t resolve xxxx” messages in your log files? In  
any case the log files should give some clue. Something is definitely  
wrong.
