[thelist] Session Problems

Jeff Wilhelm thelist at summit7solutions.com
Wed Feb 23 22:34:49 CST 2005


> Jeff,
> 
> On Wed, 23 Feb 2005 14:15:48 -0500, Jeff Wilhelm
> <thelist at summit7solutions.com> wrote: 
> > We have been having some problems where sessions are
> > getting merged. We have a web application that uses
> > sessions, and we are testing it by having three people
> > here in our office log in at the same time and perform
> > queries at the same time. We are NATed, and the server
> > is off-site, so we all appear as the same IP. When
> > queries are executed at exactly the same time (picture
> > me at the office yelling 1, 2, 3... CLICK) one person
> > will get back what another person has requested.  
> > 
> > Very odd. Has anyone run into this before?
> 
> What is handling the sessions? When you say "one person
> will get back what another person has requested", does
> that happen to each person, or do they all get the same
> thing? What about your gateway -- does it cache anything?

OK, let me step back.

We have a web application. A user logs on, does his or her thing, generates
a report, whatever, etc...

So today we were testing it, and had five or six people hitting it, and the
speed was fine, but if one person entered a query to run (via drop downs,
selects, etc...) and hit submit within a second of someone else, the person
to click first would get what they submitted, while the second person would
get a combination of what they submitted, along with what the other person
submitted.

So first we thought that maybe it was a proxy server problem, so we went to
another office that just had a Qwest DSL line. Same problem. So then I
connected to my computer in RI and the problem continued. It wasn't proxy
related, wasn't IP related, wasn't NAT related. I was running out of ideas.

So we stepped through the code in the debugger, and it's NOT Session
related. Turns out that we are using Cache[] to reduce hits against SQL for
a given page, and, well, apparently a cached array is not form-specific, but
rather global to all instances of the page. This was killing us, because
everyone saw a different page, but the array for one person was overwriting
another, cause problems when they selected items. Damn .NET...

Anyway, we're rewriting now... 

Jeff



More information about the thelist mailing list