Forum: Ruby on Rails Canceled/abandoned request to Mongrel/Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
michael_teter (Guest)
on 2009-03-05 19:19
(Received via mailing list)
Howdy.

I'm wondering what happens in Mongrel/Ruby when a user asks for a page
but then hits Stop in the browser or just clicks a different link
before the response comes back.

The reason I ask is that the app I'm building does a fair amount of
database work on each page.  From what I can tell, when a user
abandons a request, the server has no awareness of this and thus
continues waiting for the database to serve it so it can respond to
the user.

Is there some mechanism or best practice to stop this?  With the
single-threaded nature of Ruby, that one server stays tied up until it
gets its response from the database (which it no longer needs).

Thanks!
This topic is locked and can not be replied to.