Canceled/abandoned request to Mongrel/Ruby


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).