Mongrel incorrectly reports missing PID files

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.

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

John,

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

it would be useful posting you configuration files.


Aníbal Rojas

http://anibal.rojas.com.ve

On Sat, Aug 23, 2008 at 7:03 AM, John S.
[email protected] 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/.


Aníbal

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

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.

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

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.