# Apache freezing with Passenger

**URL:** <https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597>\
**Category:** Rails\
**Created:** [June 3, 2010, 6:58pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597 "2010-06-03T18:58:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 3, 2010, 6:58pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597/1 "2010-06-03T18:58:16Z")

</div>

We have a virtual server running CentOS5 and Rails 2.3.5 with Ruby  
1.8.7. There are two lightly used rails apps in production on the  
server. Every so often, maybe once a month, Apache freezes. A  
simple service reset restores service. Has anyone else experienced  
such a problem? Any ideas as to what it could be? We’re new to  
rails, so we could easily have missed an important configuration  
option in the rails apps, apache or passenger.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 3, 2010, 7:32pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597/2 "2010-06-03T19:32:13Z")

</div>

examine your error\_log (/var/log/httpd/error\_log?) and the  
production.log. What is the issue? Does it just freeze without a  
note in the logs?

---

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 3, 2010, 8:03pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597/3 "2010-06-03T20:03:50Z")

</div>

Yes. I just asked our sysadmin. The httpd log shows that max\_clients  
limit is reached. When we first ran into the problem, we raised it to  
256, then to 500. We never have more than 2 or 3 using the server at  
a time, so it seems something is not closing properly.

Thanks.

---

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 3, 2010, 8:25pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597/4 "2010-06-03T20:25:29Z")

</div>

I had a similar problem - our log read:

```
/!\ FAILSAFE /!\ Thu Apr 29 10:55:46 -0400 2010
  Status: 500 Internal Server Error
  Host 'coolhostname.com' is blocked because of many connection

```

errors; unblock with ‘mysqladmin flush-hosts’

so, that mysqladmin flush-hosts cleared up the problem, but then the  
problem happened again and again.

We ended up fixing it for good by setting ‘max\_connect\_errors’ to 512.

Good luck,  
Jason

---

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 4, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/apache-freezing-with-passenger/189597/5 "2010-06-04T15:30:58Z")

</div>

> Has anyone else experienced such a problem?

I have. And I did not know the reason why, but running Rails directly  
on port 80 not via Passenger/Apache does not have this problem.
