High CPU consumption, stops responding.

5 views
Skip to first unread message

Jason Hines

unread,
Apr 15, 2008, 11:00:02 AM4/15/08
to Phusion Passenger Discussions
First, I have to express how exciting this is. On my first conversion
from Mongrel to Passenger, it went very smooth. (Debian Linux, Ruby
1.8.5) I haven't seen a single hiccup - working wonderfully.

On my second conversion, the app is a bit larger and receives more
hits. (CentOS 5, Ruby 1.8.5) After switching to Passenger, Apache
stops serving any requests. Examining the logs, I see that it's
receiving a LOT of requests, and CPU/load is rising quickly.

After much tinkering, I decide to rule out the possibility of the
problem being my application itself, so I create a new Rails app on
the server, and use Passenger to serve it.

I begin hammering it (manually). After a while, I experience the same
problem. Eventually, Apacge stops responding, and I see the CPU usage
climb. At this point I see only these in the error_log.

[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']
[24231:ApplicationPoolClientServer.h:426] Client 0x9077fb0: received
message: ['setMax', '2']

.. Indefinitely, as the CPU usage climbs, until I restart Apache.

As you can see I have set RailsMaxPoolSize 2, in an attempt to control
this. Before this change the setMax message was 20 - but the result
is the same.

So at this point, I know it's not my application. This is a brand new
rails app. It must be something with this server's configuration and
I'm having trouble figuring out where it could be.

The server is hosted at RailsMachine w/ Apache 2.2.3.

Any ideas or suggestions are appreciated. Thanks.


Jason Hines

unread,
Apr 15, 2008, 5:01:40 PM4/15/08
to Phusion Passenger Discussions
I've upgraded to Ruby 1.8.6-p114 on this server, and experiencing the
same problem.

Jason Hines

unread,
Apr 16, 2008, 2:06:22 AM4/16/08
to Phusion Passenger Discussions
More information on this issue:

I've noticed with this installation of Passenger on CentOS, when I
hammer the URL using httperf, Passenger is not spawning new processes
like I believe it should. So what I may be experiencing here is that
I have a single application instance which is being flooded with
requests. Why Passenger is not spawning new instances, I'm not sure.
I'll keep looking and hopefully will find something enlightening soon.

Eugenol

unread,
Apr 17, 2008, 1:12:42 PM4/17/08
to Phusion Passenger Discussions
I do experience the same problem and my rails app is somewhat idle as
it's just for testing, so no hammering.
I had to unload Passenger as apache became unresponsive and took 99%
WCPU.

Running apache 2.2.8 with ruby-1.8.6,1 on FreeBSD 6.2-RC1 (SMP) #2

Eugenol

unread,
Apr 17, 2008, 1:16:15 PM4/17/08
to Phusion Passenger Discussions

> I do experience the same problem

I also discovered such errors on the same single line:

[0x11ac9:ApplicationPoolClientServer.h:0x1aa] Client
[0x80a5f000x11ac9: received message: :['setMax',
'20']ApplicationPoolClientServer.h
:0x1aa[] 0x11ac9Client :0x80a5f00ApplicationPoolClientServer.h:
received message: :['setMax', '20']0x1aa
] Client [0x80a5f000x11ac9: received message: :
[[[[[[[[[[[['setMaxIdleTime',
'120']ApplicationPoolClientServer.h0x11ac90x11ac90x11ac90x11ac90x11ac90x11ac90x11ac90x11ac90x11ac90x11ac90x11ac9
::::::::::::
0x1aaApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.hApplicationPoolClientServer.h] :::::::::::Client
0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x1aa0x80a5f00] ] ] ] ] ] ] ] ] ] ] :
received message: Client Client Client Client Client Client Client
Client Client Client Client ['setMaxIdleTime',
'120']0x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f000x80a5f00
: received message: : received message: : received message: : received
message: : received message: : received message: : received message: :
received message: : received message: : received message: : received
message: ['setMax', '20']['setMax', '20']['setMax', '20']['setMax',
'20']['setMax', '20']['setMax', '20']['setMax', '20']['setMax', '20']
['setMax', '20']['setMax', '20']['setMax', '20']
Reply all
Reply to author
Forward
0 new messages