# Troubleshooting Long Requests

**URL:** <https://www.ruby-forum.com/t/troubleshooting-long-requests/151728>\
**Category:** Rails\
**Created:** [October 24, 2008, 9:41pm UTC](https://www.ruby-forum.com/t/troubleshooting-long-requests/151728 "2008-10-24T21:41:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [October 24, 2008, 9:41pm UTC](https://www.ruby-forum.com/t/troubleshooting-long-requests/151728/1 "2008-10-24T21:41:44Z")

</div>

Hello-

I’m using Scout to monitor a Rails app of mine. What I’m noticing is  
that all of the pages in the site take a fraction of a second to  
complete. This is totally acceptable. However, occasionally I’ll have  
a request that takes 189 seconds to complete. It’s very consistent. A  
request takes a fraction of a second 99% of the time and takes either  
189 seconds or 3.5 seconds that last 1% of the time. Naturally, that  
1% of the time is when clients, friends, family, etc. are viewing the  
site. The actual page that takes 189 or 3.5 seconds to process varies

- sometimes it is the homepage, sometimes it is something like the  
About Us page.

My server setup is as follows. The server is a quad-core machine with  
2GB of RAM running RHEL 5. I’m using Nginx as the proxy and  
mongrel\_cluster running 15 mongrel instances. Other than that, I’ve  
got MySql, Sphix, and backgroundRB runnning. The server is under very  
low utilization, only getting a few hundred visitors a day and never  
consuming more than 1% of the processor and 50% of the memory.

Does anyone have any ideas on how best to troubleshoot this?

Regards,  
Eric

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [October 24, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/troubleshooting-long-requests/151728/2 "2008-10-24T22:06:56Z")

</div>

On Oct 24, 8:41 pm, emarthinsen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - sometimes it is the homepage, sometimes it is something like the

can you reproduce it ? Look at your logs for the times when it has  
happened, is there a common pattern in terms of the requests?  
(parameters, things all of those requests do, something else?). Are  
the requests slow because you’re spending loads of time talking to the  
database, the network, something else? Might something else be holding  
database locks that block the other pages?

Fred
