# Mongrel.pid log does not exist

**URL:** <https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141>\
**Category:** Deployment\
**Created:** [February 20, 2007, 6:22am UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141 "2007-02-20T06:22:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 20, 2007, 6:22am UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/1 "2007-02-20T06:22:33Z")

</div>

I’m getting the following error when I stop mongrel… I know its  
running but I need the log files. It appears the log isn’t being  
created / written to. I this message:

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

## This is my mongrel\_cluster.yml

cwd: /var/rails/soca/current  
port: “8000”  
environment: production  
address: 127.0.0.1  
pid\_file: log/mongrel.pid  
servers: 2

…and I’ve the following permissions on the directory:

drwxrwxrwx 2 bleroux root 4096 Feb 19 16:44 log

Which is here:

[root@server1 current]# pwd  
/var/rails/soca/current

Any ideas??

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 20, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/2 "2007-02-20T12:54:21Z")

</div>

Brian,

```
Have you tried using a full path for: pid_file: ?

```

–  
Aníbal Rojas

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

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

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 20, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/3 "2007-02-20T14:15:32Z")

</div>

On 2/20/07, Brian LeRoux [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> cwd: /var/rails/soca/current
> 
> Which is here:
> 
> [root@server1 current]# pwd  
> /var/rails/soca/current
> 
> Any ideas??

It is a known bug. You should specify full path log and pid files for  
mongrel\_cluster.

## – Luis L. Multimedia systems

Leaders are made, they are not born. They are made by hard effort,  
which is the price which all of us must pay to achieve any goal that  
is worthwhile.  
Vince Lombardi

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 21, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/4 "2007-02-21T16:56:58Z")

</div>

This may be a silly question, but does the pid file actually exist?  
Have you checked yourself?

I’m running into an issue like this myself, which seems to be  
triggered by a slow shutdown of one thread (on port 8001, say).  
Capistrano doesn’t wait for the shutdown and tries to do a restart,  
but when the new thread on 8001 starts it can’t write the pid file  
because the old one is still shutting down. Then the next time I do a  
rake deploy, the pid file doesn’t exist and I lose touch with the  
thread.

At least, that’s my best current theory.

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 20, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/5 "2007-02-20T20:05:39Z")

</div>

Ok —thanks guys, I tried specifying a full path for the pid but still  
no go.  
This must be a permissions issue… but the directory is open to the  
world to modify. This is odd.

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 21, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/6 "2007-02-21T22:39:46Z")

</div>

I finally figured it was permissions issues the whole time… which is  
my dumb. =) Runs like a champ now!

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 23, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/7 "2007-02-23T19:32:31Z")

</div>

I am having this exact same issue, and perms for log/ seem correct:

kmarsh@host:shared$ ll  
total 20K  
drwxr-xr-x 3 kmarsh 4.0K Feb 15 01:36 assets/  
drwxrwxrwx 2 kmarsh 4.0K Feb 23 14:36 log/  
drwxr-xr-x 595 www 8.0K Feb 23 18:22 photos/  
drwxrwxr-x 2 kmarsh 4.0K Dec 11 16:06 system/

Any ideas?

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 23, 2007, 8:48pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/8 "2007-02-23T20:48:49Z")

</div>

Can I see your mongrel config?

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [February 26, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/mongrel-pid-log-does-not-exist/86141/9 "2007-02-26T21:02:54Z")

</div>

Brian you mention it being a known bug, is the fact that sometimes  
when restarting mongrel clusters I will get an error stating that the  
PID already exists?

Almost like the restart process didn’t give the mongrels enough time  
to shutdown before attempting to start them up again.
