# Help me.... about net/http

**URL:** <https://www.ruby-forum.com/t/help-me-about-net-http/164800>\
**Category:** Rails\
**Created:** [April 6, 2009, 5:53am UTC](https://www.ruby-forum.com/t/help-me-about-net-http/164800 "2009-04-06T05:53:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton\_effendi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e9c0ed/32.png) [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Post date:** [April 6, 2009, 5:53am UTC](https://www.ruby-forum.com/t/help-me-about-net-http/164800/1 "2009-04-06T05:53:26Z")

</div>

Hai All.

I have big problem in net/http… please help me…

- In my application have net/http for send xml…  
my question =\> why my site only can handle one request??? so only one  
user  
can request to my server…??? if 2 user request… then the last user  
always wait or RTO…

I want in my application have one controller to check the other  
controller  
run or not (the xml run or not)  
ex: controller a --\> controller which send xml  
controller b --\> monitoring… for check the another  
controller…  
—\> i wrote net/http for request controller a (on same server)… it  
always will RTO… why??? if other server… always ok… ☹

Please help me  
Thank you very much

–  
Wu You Duan

---

<div class="post-metadata">

**Author:** ![anton\_effendi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e9c0ed/32.png) [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Post date:** [April 6, 2009, 9:26am UTC](https://www.ruby-forum.com/t/help-me-about-net-http/164800/2 "2009-04-06T09:26:21Z")

</div>

Rails is single threaded, it processes one request at a time.  
Unless you are using nginx/mongrel cluster.

You can have any number of users, but having a server call itself is  
not a good thing. You want to get out of the controller quickly, not  
be waiting on something. What you might want to do is  
to queue the work to a “worker” thread, and let the worker run in the  
background.

In Windows you can do a “service” that will do the work for you.  
Or a Daemon in Linux. Then you simply queue the work to the background  
server, it can be as simple as putting a record in a table, and having  
the daemon  
watch for it.

Then its easy to look up and see what is going on.

Also this is good practice if you have a long running process.

You can also use rufus-scheduler to schedule background activity.

If you need some help feel free to ask.

> **[Mental Paging Space](http://mentalpagingspace.blogspot.com)**
>
> A place to park ideas, inspire suggestions and makes notes for the future.
