One Mongrel spawns 3 processes

Hi,
I published the similar message on mongrel forum yesterday but nobody
has answered yet :frowning: So I decided to ask a question here.

When I start mongrel cluster on Gentoo (XEN virtual server) in
production with 8 mongrels I always have 24 processes :frowning:
Before it started on FedoraCore-5,6, CentOS-4.x and SUSE-8 with no
problems (N mongrel gave N processes).
Then I tried to start one mongrel and got 3 processes. The same I did
in the development mode with the same result as well.

ps:
21174 ? S 0:01 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e
production -p 8081 -a 127.0.0.1 -P log/mongrel.8081.pid -c /home/sites/
my_app/current -n 2 --user sites --group users
21182 ? S 0:00 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e
production -p 8081 -a 127.0.0.1 -P log/mongrel.8081.pid -c /home/sites/
my_app/current -n 2 --user sites --group users
21183 ? S 0:00 /usr/bin/ruby18 /usr/bin/mongrel_rails start -d -e
production -p 8081 -a 127.0.0.1 -P log/mongrel.8081.pid -c /home/sites/
my_app/current -n 2 --user sites --group users

top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21174 sites 16 0 117m 23m 4308 S 0 9.3 0:01.77 mongrel_rails
21182 sites 16 0 117m 23m 4308 S 0 9.3 0:00.00 mongrel_rails
21183 sites 15 0 117m 23m 4308 S 0 9.3 0:00.00 mongrel_rails

netstat:
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN 21244/ruby18

I use Rails-1.1.6, Ruby-1.8.5, Mongrel-1.0.1 for the app.

Then I created a new 'empty' app, started mongrel and gave the same
result:
24234 ? S 0:01 /usr/bin/ruby18 /usr/bin/mongrel_rails
start
24246 ? S 0:00 \_ /usr/bin/ruby18 /usr/bin/mongrel_rails
start
24248 ? S 0:00 \_ /usr/bin/ruby18 /usr/bin/
mongrel_rails start

Then I installed Rails 1.2.3 and started app using it but I got the
same result.

I have no ideas what's happened and how to fix it.
Please, could you help me to resolve the issue and advise what to do
for it.

Thanks.

Vladimir Kurnavenkov.

Let me guess: Are you using a 2.4 kernel in production and 2.6 in your
other environments?

If so, this is completely normal behaviour (related to the kernel's
process/threads representation and the display within tools like ps,
top &
co)

Cheers,
Martin

P.S.: This is definetely not Rails-Dev related so you should move this
thread to a applicable list.

Let me guess: Are you using a 2.4 kernel in production and 2.6 in your
other environments?

I have used 2.6 kernel for dev/test (centos, fc) and 2.4/2.6 for
production (centos, suse).
Current system is:
Portage 2.1.2.2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5,
2.6.16.18-xen i686)