On Tue, 21 Sep 2004 03:54:40 +0900, Mark Probert wrote
> Hi, all.
> 
> Any ideas on what the following IOWA error may mean?
> 
>   concurrent session access for #
>   /usr/local/ruby/site_ruby/iowa/Session.rb:85:in 'handleRequest'

Yep.

It means that the application already has a thread that is still running 
handling a prior request for that session.  My in-development version 
doesn't fail on this condition, but instead just lets the new thread block 
while waiting for access to the session.

This is a mixed blessing, and I am thinking of making this behavior 
configurable.  The error typically happens either because there was an 
intentional action, either someone clicking multiple times too quickly on a 
link or a button, or because you are intentionally firing off requests 
quickly via some client-side code (i.e. I have an app for doing file 
downloads that triggers multiple IOWA actions on a single click), or it 
happens because you have an error in some piece of your ruby code that is 
keeping it from returning in a reasonable amount of time.

In the case of an error, it's probably better to get the concurrent session 
access message than for everything to just silently block.  However, in the 
case of a benign or intentional seuqence of requests that simply came in on 
a single session too fast, it's a good thing if they wait quietly for their 
shot at the session.

Mark, if you want it, I can send you a replacement Session.rb from the in-
development codebase that simply logs the session collision and then blocks 
the thread until it can get access to the session instead of throwing an 
error.  Just email me privately.


Thanks,

Kirk Haines