# ActiveResource - pointing to my own app hangs

**URL:** <https://www.ruby-forum.com/t/activeresource-pointing-to-my-own-app-hangs/133736>\
**Category:** Rails\
**Created:** [April 3, 2008, 2:07am UTC](https://www.ruby-forum.com/t/activeresource-pointing-to-my-own-app-hangs/133736 "2008-04-03T02:07:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [April 3, 2008, 2:07am UTC](https://www.ruby-forum.com/t/activeresource-pointing-to-my-own-app-hangs/133736/1 "2008-04-03T02:07:27Z")

</div>

I have an application that knows how to both serve and consume RESTful  
resources using rails conventions for serving, and ActiveResource for  
consuming.

When I run two instances of the application and hit the page to display  
resources on the other running application, that works fine.

When I change the code to point to the same running application on the  
same port for both client & server, that hangs and does not return.

The application design will stay much simpler and cleaner if the local  
server is treated exactly the same as remote servers in this one piece  
of the code.

It seems plausible to me that this is because I’m running the  
application on a single Mongrel instance and I’m hanging because the  
same thread that is waiting for a response would have to provide that  
response, thus blocking itself.

Does that make sense?

Has anyone else seen this same behavior or have useful insights?

Thanks!  
-Steve-

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [April 3, 2008, 5:28am UTC](https://www.ruby-forum.com/t/activeresource-pointing-to-my-own-app-hangs/133736/2 "2008-04-03T05:28:26Z")

</div>

Thanks Steve!

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [April 3, 2008, 5:09am UTC](https://www.ruby-forum.com/t/activeresource-pointing-to-my-own-app-hangs/133736/3 "2008-04-03T05:09:54Z")

</div>

On Apr 2, 2008, at 5:07 PM, Stephen A. wrote:

> same port for both client & server, that hangs and does not return.  
> Does that make sense?
> 
> Has anyone else seen this same behavior or have useful insights?
> 
> ## Thanks! -Steve-

Yep, it’s that Rails is only able to process one request per server.  
Since it is Mongrel, I guess you’d call it ZedLock 🙂
