# Repeated Race Conditions in Rails 3.0

**URL:** <https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764>\
**Category:** Rails\
**Created:** [September 29, 2010, 7:56pm UTC](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764 "2010-09-29T19:56:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 29, 2010, 7:56pm UTC](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764/1 "2010-09-29T19:56:15Z")

</div>

I’m using “rails s” to test. I have a simple search controller, with  
an index method that I call with different parameters that let me  
drill down in a result set.

I have a link\_to that is calling the exact same search\_url method in  
the view, but with an additional parameter. The link is being  
generated just fine. But when I click on that link, the following  
happens:

1. The ruby process jumps to 100% CPU utilization
2. Nothing is written to the console. Not even the request.
3. Ctrl-C won’t quit, the thing is hung.

I can’t troubleshoot what I can’t see. Is there somewhere else I can  
get a stack trace from in order to figure out why my little app is  
struggling so badly with this simple request?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 29, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764/2 "2010-09-29T21:08:16Z")

</div>

On Wed, Sep 29, 2010 at 12:54 PM, AK [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 1. Nothing is written to the console. Not even the request.
> 2. Ctrl-C won’t quit, the thing is hung.
> 
> I can’t troubleshoot what I can’t see. Is there somewhere else I can  
> get a stack trace from in order to figure out why my little app is  
> struggling so badly with this simple request?

In development you typically run a single Ruby that can only handle  
one request at a time. This is normal. Run your app under passenger  
(or something similar) if you want more than one request at a time be  
fulfilled.

–  
Greg D.  
[destiney.com](http://destiney.com) | [gregdonald.com](http://gregdonald.com)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 29, 2010, 9:47pm UTC](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764/3 "2010-09-29T21:47:30Z")

</div>

On Wednesday 29 September 2010, AK wrote:

> 1. The ruby process jumps to 100% CPU utilization
> 2. Nothing is written to the console. Not even the request.
> 3. Ctrl-C won’t quit, the thing is hung.
> 
> I can’t troubleshoot what I can’t see. Is there somewhere else I can  
> get a stack trace from in order to figure out why my little app is  
> struggling so badly with this simple request?

Insert a debugger call in the appropriate place, presumably the  
controller action, and start your server with rails s -d.

Michael

–  
Michael S.  
[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://www.schuerig.de/michael/](http://www.schuerig.de/michael/)
