Always get one extra process after restart

8 views
Skip to first unread message

gobigdave

unread,
Sep 23, 2009, 3:41:44 PM9/23/09
to Phusion Passenger Discussions
My site does not get crushed with traffic, and I try to keep the
number of instances low enough so nothing swaps. I have this in my
Apache config:

PassengerMaxPoolSize 3
PassengerMaxInstancesPerApp 3
PassengerPoolIdleTime 0

What I find is that if I touch tmp/restart.txt or restart Apache, I
always end up with 4 ruby processes. It's become part of my routine
now after each deploy or restart.

1. run sudo passenger-status to see all the passenger processes.
2. kill the one that doesn't belong

Based on the PIDs, it seems like this is the first process that is
fired off, but it then gets forgotten about and 3 more are loaded up.
It feels like a timeout where Passenger tries to load up a process,
but it takes too long so it tries again. The rest finish because files
are probably cached, etc.

Is there something I can do to prevent this?

gobigdave

unread,
Sep 27, 2009, 7:32:32 AM9/27/09
to Phusion Passenger Discussions
Am I the only one seeing this problem?

trustfundbaby

unread,
Sep 28, 2009, 3:44:32 AM9/28/09
to Phusion Passenger Discussions
And your the line that starts with
max =
in passenger-status is 3 right?

trustfundbaby

unread,
Sep 28, 2009, 3:53:12 AM9/28/09
to Phusion Passenger Discussions
Have you tried playing with the PassengerMaxPoolSize to see if this
happens consistently.
3 spawned when 2 is max etc?

gobigdave

unread,
Sep 29, 2009, 6:52:30 AM9/29/09
to Phusion Passenger Discussions
Yes, I just bumped up the memory on my server and increased
PassengerMaxPoolSize to 5. Now, I often get 6 processes when I first
start up. I haven't done any serious experimentation, however, because
this is my production box.

-Dave

John Bresnik

unread,
Sep 29, 2009, 8:39:53 AM9/29/09
to phusion-...@googlegroups.com

On Sep 29, 2009 6:52 AM, "gobigdave" <gobi...@gmail.com> wrote:


Yes, I just bumped up the memory on my server and increased
PassengerMaxPoolSize to 5. Now, I often get 6 processes when I first
start up. I haven't done any serious experimentation, however, because
this is my production box.

-Dave

On Sep 28, 3:53 am, trustfundbaby <ikecof...@gmail.com> wrote: > Have you tried playing with the Pa...

John Bresnik

unread,
Sep 29, 2009, 8:41:16 AM9/29/09
to phusion-...@googlegroups.com

Pretty sure the extra processes is what is spawning others, I.e. a spawn server - not an instance of your app..

On Sep 29, 2009 6:52 AM, "gobigdave" <gobi...@gmail.com> wrote:


Yes, I just bumped up the memory on my server and increased
PassengerMaxPoolSize to 5. Now, I often get 6 processes when I first
start up. I haven't done any serious experimentation, however, because
this is my production box.

-Dave

On Sep 28, 3:53 am, trustfundbaby <ikecof...@gmail.com> wrote: > Have you tried playing with the Pa...

trustfundbaby

unread,
Sep 30, 2009, 4:21:18 AM9/30/09
to Phusion Passenger Discussions
spawn server process does not show up in passenger-status.

On Sep 29, 7:41 am, John Bresnik <jbres...@gmail.com> wrote:
> Pretty sure the extra processes is what is spawning others, I.e. a spawn
> server - not an instance of your app..
>

gobigdave

unread,
Sep 30, 2009, 7:04:56 AM9/30/09
to Phusion Passenger Discussions
I don't think it's the spawn process. If I reboot, passenger-status
shows 0 processes, and top shows the single ruby spawn process (around
20-30 meg). I hit my site with traffic, and I end with 6 processes --
all around 100 meg plus the original 20-30 meg process (I assume this
is the spawn one). Passenger status still shows 5 processes, but there
are 6 listed in top plus the spawn.

In addition, I can kill off the extra process and wait for the others
to be killed off by passenger due to inactivity. New processes are
started with traffic without the extra process that I killed, so I'm
pretty sure the extra process is not the one doing the spawning. Note,
I never get the extra process again once I kill it. It's only on
initial restart.

-Dave

trustfundbaby

unread,
Sep 30, 2009, 9:21:31 AM9/30/09
to Phusion Passenger Discussions
You should cut and paste what exactly you are seeing, both in top (I
recommend htop) and with passenger-status.
> > > tried playing with the Pa...- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages