"Simon Dean" <sjdean@simtext.plus.comwrote in message
news:5tkeb9F1dm9j3U1@mid.individual.net...
Quote:
Hi,
>
I believe I have a website (I didn't do the original coding) which uses
JavaScript/ASP to generate cookies.
>
It's a shopping cart application called UCart I believe.
>
The technologies involved are:
>
ASP
JavaScript
IIS
Microsoft Access
>
Im transferring this to a new host but am finding a problem with
Cookies. On the previous host, it was solved by them configuring the
server to place the website into a "lower contention session pool".
>
Has anyone heard of this, or can they offer any ideas as to how this
might be effected programmatically, or what a suggested alternative
might be.
>
To be honest Im having trouble figuring this mess out and how its all
called.
>
Thanks
Simon
>
>
Here is a snippet of code.
>
<snip />
The problem is here:-
Quote:
if (Session(this.Name) != null) {
this.SC = Session(this.Name).SC;
} else {
this.SC = new Array(this.numCols);
and here:-
Quote:
>function UCpersist() {
Session(this.Name) = this;
if (this.bStoreCookie) this.SetCookie();
>}
The code is storing an object in the Session. When this happens an
affiliation is created between the current thread and the session. ASP
Requests for this session must now always be run on the affiliated thread.
This creates 'contention' when two or more requests arrive which require the
same thread. Despite there being other worker threads available and CPU
capacity only one of requests can be processed and the others have to queue.
This hurts scalability and is generally discouraged.
You can help to reduce this (IMO poor design choice) by increasing the
AspProcessorThreadMax metabase property (default is 25). This property
defines the maximum size of the worker thread pool. Increasing this can
help spread the sessions across multiple threads thereby decreasing the
thread contention that results from session affiliation.
The downside is that potentially you end up with too many threads trying to
execute at once resulting in the cost of extra context switching. The
impact of the extra switching is probably a lot less than leaving requests
queued up that might otherwise begin processing.
--
Anthony Jones - MVP ASP/ASP.NET