Forum: Ruby on Rails help me.... about net/http

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
anton effendi (Guest)
on 2009-04-06 07:53
(Received via mailing list)
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
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
run or not (the xml run or not)
ex: controller a --> controller which send xml
      controller b --> monitoring..... for check the another
---> 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
glennswest (Guest)
on 2009-04-06 11:26
(Received via mailing list)
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

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.
This topic is locked and can not be replied to.