# Mongrel incorrectly reports missing PID files

**URL:** <https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570>\
**Category:** Deployment\
**Created:** [August 22, 2008, 1:33pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570 "2008-08-22T13:33:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 22, 2008, 1:33pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/1 "2008-08-22T13:33:00Z")

</div>

I’m getting some strange behavior on a Mongrel deployment (my first,  
please be patient). I’ve set up the mongrel\_cluster.yaml ok and I can  
start the cluster OK. But when I try to stop it using mongrel\_rails  
cluster::stop then I get this

!!! PID file tmp/pids/mongrel.8000.pid does not exist. Not running?

Even though the files are definitely there and have the correct pids  
inside them.

But the really strange thing is that the second attempt at stopping the  
cluster will work just fine. Also if I do the sequence start, status,  
stop then it works. So start, stop fails, but start, stop, stop works  
and start, status, stop also works.

Something odd is going on inside mongrel\_rails so that it isn’t getting  
the path to the pid file correctly, and somehow a stop or status request  
will kick things back into order. Which implies that these operations  
alter the state of something. A request for status shouldn’t alter the  
state of anything.

Any ideas what might be going on? I’m getting a bit weary of the setup  
issues with mongrel and might switch to passenger.

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 22, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/2 "2008-08-22T13:46:58Z")

</div>

You will have a log for every mongrel, mongrel logs said anything?

John S. escribiÃ³:

> But the really strange thing is that the second attempt at stopping the  
> Any ideas what might be going on? I’m getting a bit weary of the setup  
> issues with mongrel and might switch to passenger.

–  
Rafael Garcia Ortega

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 22, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/3 "2008-08-22T14:28:00Z")

</div>

John,

```
Rafael question is good, what do your mongrel log files say? Also

```

it would be useful posting you configuration files.

–  
Aníbal Rojas

> **[Home - Has Many Developers](https://hasmanydevelopers.com/)**
>
> We are the best choice for your building design and development

> **[RUBYCORNER.COM](https://www.rubycorner.com/)**
>
> RUBYCORNER.COM - Contact us for any business inquiries

[http://anibal.rojas.com.ve](http://anibal.rojas.com.ve)

On Sat, Aug 23, 2008 at 7:03 AM, John S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## Any ideas what might be going on? I’m getting a bit weary of the setup issues with mongrel and might switch to passenger.
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Aníbal

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 28, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/4 "2008-08-28T16:38:30Z")

</div>

Hey John,

Forget mongrel, use thin same as mongrel but better than.  
check once:  
gem install thin  
thin config -C /app/current/config/thinapp.yml -e production -s2 -p7200  
thin start /app/current/config/thinapp.yml

do once.

shrii

John S. wrote:

> Well this is getting weirder and weirder because I’ve found that if I do  
> anything even just “ls -l config” or “ps -A | grep mong” or anything  
> else in between starting the cluster and stopping it then it works just  
> fine.
> 
> So in full production it’s never going to be a problem since there will  
> always be at least one disk access in between starting and stopping, and  
> this machine isn’t going to be the production machine anyway.
> 
> Weird but it’s obviously something to do with my setup and as I’ve had  
> other strange problems on that machine before I’m going to put it down  
> to it being a weird machine. Thankfully it’s only a staging server.
> 
> Thanks for the prompt responses
> 
> John S.
> 
> Rafael GarcÃ­a wrote:
> 
> > You will have a log for every mongrel, mongrel logs said anything?
> > 
> > John S. escribiÃ³:
> > 
> > > But the really strange thing is that the second attempt at stopping the  
> > > Any ideas what might be going on? I’m getting a bit weary of the setup  
> > > issues with mongrel and might switch to passenger.
> > 
> > –  
> > Rafael Garcia Ortega

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 29, 2008, 9:38am UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/5 "2008-08-29T09:38:00Z")

</div>

Shrikant

Hi, yes I got away from Mongrel+mod\_proxy, currently I’m using mod\_rails  
aka Passenger, but will look at Thin because it’s getting good reports.

Thanks for the advice

John S.

Shrikant L. wrote:

> Hey John,
> 
> Forget mongrel, use thin same as mongrel but better than.  
> check once:  
> gem install thin  
> thin config -C /app/current/config/thinapp.yml -e production -s2 -p7200  
> thin start /app/current/config/thinapp.yml
> 
> do once.

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 22, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/6 "2008-08-22T14:39:48Z")

</div>

Well this is getting weirder and weirder because I’ve found that if I do  
anything even just “ls -l config” or “ps -A | grep mong” or anything  
else in between starting the cluster and stopping it then it works just  
fine.

So in full production it’s never going to be a problem since there will  
always be at least one disk access in between starting and stopping, and  
this machine isn’t going to be the production machine anyway.

Weird but it’s obviously something to do with my setup and as I’ve had  
other strange problems on that machine before I’m going to put it down  
to it being a weird machine. Thankfully it’s only a staging server.

Thanks for the prompt responses

John S.

Rafael GarcÃ­a wrote:

> You will have a log for every mongrel, mongrel logs said anything?
> 
> John S. escribiÃ³:
> 
> > But the really strange thing is that the second attempt at stopping the  
> > Any ideas what might be going on? I’m getting a bit weary of the setup  
> > issues with mongrel and might switch to passenger.
> 
> –  
> Rafael Garcia Ortega

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 29, 2008, 10:05am UTC](https://www.ruby-forum.com/t/mongrel-incorrectly-reports-missing-pid-files/146570/7 "2008-08-29T10:05:16Z")

</div>

Hey john.

Thanks,  
Shrikant  
John S. wrote:

> Shrikant
> 
> Hi, yes I got away from Mongrel+mod\_proxy, currently I’m using mod\_rails  
> aka Passenger, but will look at Thin because it’s getting good reports.
> 
> Thanks for the advice
> 
> John S.
> 
> Shrikant L. wrote:
> 
> > Hey John,
> > 
> > Forget mongrel, use thin same as mongrel but better than.  
> > check once:  
> > gem install thin  
> > thin config -C /app/current/config/thinapp.yml -e production -s2 -p7200  
> > thin start /app/current/config/thinapp.yml
> > 
> > do once.
