# Controller/Action Problem

**URL:** <https://www.ruby-forum.com/t/controller-action-problem/188801>\
**Category:** Rails\
**Created:** [May 18, 2010, 5:43pm UTC](https://www.ruby-forum.com/t/controller-action-problem/188801 "2010-05-18T17:43:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![machinetobe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@machinetobe](https://www.ruby-forum.com/u/machinetobe)\
**Post date:** [May 18, 2010, 5:43pm UTC](https://www.ruby-forum.com/t/controller-action-problem/188801/1 "2010-05-18T17:43:46Z")

</div>

hey guys,

i’ve got the following problem:  
i call an action called “execute\_algorithms”. one codeline of this  
action tries to execute the following command:

parser =  
LibXML::XML::Parser.file(“[http://localhost:3000/XMLFiles/results.xml](http://localhost:3000/XMLFiles/results.xml)”)

but it won’t work. with an url of a foreign server it works. so it seems  
to me, that rails can’t execute an action (over HTTP) while executing  
another one? Is that right and how can i solve this problem? I’m working  
with Mongrel.

It would be so great if you guys could help me!!

Greetz, Tobe

---

<div class="post-metadata">

**Author:** ![machinetobe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@machinetobe](https://www.ruby-forum.com/u/machinetobe)\
**Post date:** [May 18, 2010, 8:05pm UTC](https://www.ruby-forum.com/t/controller-action-problem/188801/2 "2010-05-18T20:05:49Z")

</div>

On May 18, 2010, at 11:43 AM, Tobias H. wrote:

> seems  
> to me, that rails can’t execute an action (over HTTP) while executing  
> another one? Is that right and how can i solve this problem? I’m  
> working  
> with Mongrel.
> 
> It would be so great if you guys could help me!!
> 
> Greetz, Tobe

Run more than one mongrel and proxy through a web listener like Apache  
or nginx. If you can only service one request at time, that request  
will never be able to get another one through at the same time.

-Rob

Rob B.  
[http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

> **[Launch Scout Custom Software Development & Software Consulting](https://launchscout.com/)**
>
> We solve digital problems through custom software development and design for the web—apps, mobile, desktop and devices.

removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![machinetobe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@machinetobe](https://www.ruby-forum.com/u/machinetobe)\
**Post date:** [May 18, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/controller-action-problem/188801/3 "2010-05-18T20:17:31Z")

</div>

Hi Tobias,

Another alternative to Rob’s suggestion, … if you can, I’d recommend  
bailing on mongrel altogether, and just switch to running your rails  
apps under passenger (ie mod\_rails / mod\_rack) via apache or ngnix.  
Passenger can handle more than one request to your rails app at a  
time, thus no need for setting up and managing mongrel instances or  
proxy’d mongrel clusters, etc.

Ever since I switched to using passenger, both for development and  
production envs, I’ve never gone back to using mongrel to serve rails  
apps.

Jeff

On May 18, 11:04 am, Rob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
