# Can't get mongrel to work as daemon

**URL:** <https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512>\
**Category:** Mongrel\
**Created:** [May 23, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512 "2008-05-23T21:05:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [May 23, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512/1 "2008-05-23T21:05:39Z")

</div>

I’m a mongrel newbie and a linux newbie. I have two CENTOS 5 servers.  
On server A, my app works fine, with mongrel in daemon mode. On server  
B, it works fine if I just say mongrel\_rails start, but if I add -d, it  
doesn’t run. Suggestions?

---

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [May 23, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512/2 "2008-05-23T21:17:46Z")

</div>

Ken Bryant wrote:

> I’m a mongrel newbie and a linux newbie. I have two CENTOS 5 servers.  
> On server A, my app works fine, with mongrel in daemon mode. On server  
> B, it works fine if I just say mongrel\_rails start, but if I add -d, it  
> doesn’t run. Suggestions?

Ack! I found it. Sorry to bother you all.

---

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [June 23, 2010, 7:50pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512/3 "2010-06-23T19:50:04Z")

</div>

I’m on Red Hat rhel 5. Apache 2.2, Mongrel 1.1.5, Ruby 1.8.6, Rails  
2.3.5

When I run mongrel with -d it crashes the first time it’s accessed. It  
doesn’t return anything. It doesn’t log anything in development.log or  
production.log depending on how I run it. There is absolutely nothing  
interesting in the mongrel or apache logs even with -B.

I recently upgraded to Rails 2.3.5. That’s when it stopped working.  
I tried going to 2.3.8, but that was worse. I tried going back to  
mongrel 1.1.4, but that did the same thing.

I can run mongrel in the background then disown it, but that’s a huge  
pain to restart a cluster of mongrels that way. I’ve been googling for  
days and this is the only post that even comes close. Of course, the  
solution wasn’t posted…

Thanks,  
Rick

---

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [August 13, 2011, 11:52pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512/4 "2011-08-13T23:52:55Z")

</div>

> Ack! I found it. Sorry to bother you all.

What was the solution? I have the same problem: can run my Rails site  
perfectly without the -d (daemon) option, but with -d everything looks  
fine but the thread just dies.

My setup:  
Rails 2.3.5  
mongrel 1.1.5

Thanks!

Tom.
