perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <>
Subject Re: Detecting request cancellation behind proxy servers
Date Wed, 16 Nov 2005 17:21:53 GMT
On Wed, 2005-11-16 at 10:11 +1000, Badai Aqrandista wrote:
> But I need to know if a request has been cancelled. The problem is that I 
> need to release the session lock when someone click submit button before the 
> page is fully loaded, otherwise the next page won't load because it is 
> waiting for the session lock to be released by the previous process that has 
> been cancelled before releasing it.

Why are you using locking with your sessions?  Are you doing something
that truly requires it?  You already have atomic updates if you use
database-backed session storage.

Consider moving this data out of your session and passing it in URLs
instead.  Consider separating out the slow part of handling this request
into a forked process, so that the session is not locked during the
whole calculation.

In other words, look for a way to avoid the root of the problem: doing a
slow operation and keeping the session locked the whole time.

- Perrin

View raw message