Newbie question about mongrel

Hello!

At the begining i want to say that i am no expert. I had my deployment
server configured by my friend. Anyway I am running on VPS on Debian
Sarge.

I use mongrel & nginx combination.

I have the following problem. It seems to me mongrel needs to kind of
“warm up”. After somebody enters the site, then the pages load fast for
everybody, but the first “initial load” sometimes takes to 40 seconds! I
dont think its connected with nginx, because it happens when i enter
through nginx or directly at mongrel at some :3000 port. Any ideas? It’s
really strange for me.

Sounds like it may be slow dynamic rendering rescued by some form of
caching.
To test this guess, try to hit the same page twice after restarting
Mongrel,
and see if it’s fast the second time.

Alex

Alexey V. wrote:

Sounds like it may be slow dynamic rendering rescued by some form of
caching.
To test this guess, try to hit the same page twice after restarting
Mongrel,
and see if it’s fast the second time.

Alex

After restart, page loads fast, the first, and the second time. I am
using mongrel cluster also. Maybe after some time of running it slows
down and if nobody enters the site the “first load” takes forever.

Pablo wrote:

After restart, page loads fast, the first, and the second time. I am
using mongrel cluster also. Maybe after some time of running it slows
down and if nobody enters the site the “first load” takes forever.

Any chance you’re low on memory and your mongrel process(es) are getting
swapped out?

–Al Evans

On 3/6/07, Al Evans [email protected] wrote:

Any chance you’re low on memory and your mongrel process(es) are getting
swapped out?

This would be my second guess, too.

Alex

On 3/6/07, Pablo [email protected] wrote:

“warm up”. After somebody enters the site, then the pages load fast for
everybody, but the first “initial load” sometimes takes to 40 seconds! I
dont think its connected with nginx, because it happens when i enter
through nginx or directly at mongrel at some :3000 port. Any ideas? It’s
really strange for me.

You should search the mongrel list for this issue - I no its come up
before and Zed has commented on it.

  • Rob

In production mode, the first time your app is accessed on each
instance of mongrel, mongrel loads all the ruby classes it needs (it
loads them EVERY time in development). The load is what’s slowing down
the initial hit to each mongrel. After that, the classes are present
in memory, thus fast hits.

-C

On Mar 6, 6:38 am, “Alexey V.” [email protected]

On 3/6/07, cee-dub [email protected] wrote:

The load is what’s slowing down
the initial hit to each mongrel. After that, the classes are present
in memory, thus fast hits.

Quoting Pablo:

After restart, page loads fast, the first, and the second time. I am
using mongrel cluster also. Maybe after some time of running it slows
down and if nobody enters the site the “first load” takes forever.

So, it’s not that. Besides, I never saw it taking up to 40 seconds.

Alex

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs