List Info

Thread: Pound and Long running actions




Pound and Long running actions
country flaguser name
Germany
2007-10-05 01:15:27
I have a site with some administration actions that are long
running.
The problem seems to be that pound is sending requests to
this locked up
mongrel process, even though it has three other open ones. 
This is
manifested as intermittent "Internal Server Error"
when browsing the
site while this action is running.  It happens about 1 in 4
page loads,
and there are 4 mongrels so I am pretty sure this is whats
going on.

I cant find any log entries about anything going wrong.  How
do I tell
pound to only send requests to unused mongrels?

I had this working on another box with lighttpd, which
handled this
beautifully.

Thanks!
-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Pound and Long running actions
country flaguser name
United States
2007-10-06 07:03:29
Alex,

    I would strongly recommend reworking your code to
execute your
long running actions in a separated thread. This way you
will prevent
that every Mongrel gets busy with long running threads and
your
aplication becomes unresponsive.

    There are different ways to handle Rails long running
threads, the
simplest is to spawn a new script/runner process, also you
could use
BackgroundDrb:

    http://backgroundr
b.rubyforge.org/

    Best regards,

--
Aníbal Rojas
http://www.hasmanyde
velopers.com
http://www.rubycorner.com
http://www.anibal.tumblr
.com

On Oct 5, 2:15 am, Alex Wayne <ruby-forum-incom...andreas-s.net>
wrote:
> I have a site with some administration actions that are
long running.
> The problem seems to be that pound is sending requests
to this locked up
> mongrel process, even though it has three other open
ones.  This is
> manifested as intermittent "Internal Server
Error" when browsing the
> site while this action is running.  It happens about 1
in 4 page loads,
> and there are 4 mongrels so I am pretty sure this is
whats going on.
>
> I cant find any log entries about anything going wrong.
 How do I tell
> pound to only send requests to unused mongrels?
>
> I had this working on another box with lighttpd, which
handled this
> beautifully.
>
> Thanks!
> --
> Posted viahttp://www.ruby-forum.com
/.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Pound and Long running actions
country flaguser name
Germany
2007-10-06 17:18:37
Aníbal Rojas wrote:
> Alex,
> 
>     I would strongly recommend reworking your code to
execute your
> long running actions in a separated thread. This way
you will prevent
> that every Mongrel gets busy with long running threads
and your
> aplication becomes unresponsive.
> 
>     There are different ways to handle Rails long
running threads, the
> simplest is to spawn a new script/runner process, also
you could use
> BackgroundDrb:
> 
>     http://backgroundr
b.rubyforge.org/
> 
>     Best regards,

I knew that was an option, but this is a somewhat old rails
app at this 
point for an old client.  I was trying to avoid spending
this refactor 
time, hoping that mongrel + pound could handle this as
elegantly as 
lighttpd + fcgi did.

There is also the added issue that the long running action
writes to the 
session periodcally to update the user on its process.  This
would not 
work with Drb or script/runner since there is no session
there.  I guess 
I can write it to a file, and read that in.

But it's work I was hoping I wouldn't have to do.

Thanks for the tips
-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )