And remember, set oObject=Nothing, not 0.![]()
| SitePoint Sponsor |





And remember, set oObject=Nothing, not 0.![]()
Hi siteguru,
I finally got round to testing the Sessions closure by adding the following code to my Global.asa file:
And it turns out that when the session has timed out, this variable (Application("TEST")) does not get set.. This can't be good. Does that imply that any session created is not being successfully released?Sub Application_OnStart
Application("TEST")=""
End Sub
Sub Session_OnEnd
Application("TEST")="I Fired"
End Sub
Cheers,
Tom
Okay, its been a few months. Some tears have been shed. But after banging the head on the desk for many a day, I think I've finally come across the solution to the Session problem..
Just to remind you, the issue was that Session_OnEnd was not being called giving me a false representation of the number of users online and adding to my list of weird behaviour and problems.
The solution comes from the fact that IIS 7 has this ASP->Debugging->Run On End Functions Anonymously value (in IIS Mgr) which is set to True by default. This, apparently, results in the Session_OnEnd functions not working under certain conditions (my app pool runs anonymously I think).
I have set this value to False, and since then my session counter stays at a sensible 1-100 range (we aren't that busy a site).
In addition, I have had some cookie issues where carts were disappearing when people switched to secure http. This can be traced to the IIS Mgr->ASP->Session Properties->New ID On Secure Connection property, which also wants to be set to False if your carts use the session ID to store themselves...
Finally, WRT the performance issues here. I have discovered some code that was present in the cart code (executed on every page) that was looping through a resultset of every product each time a new page was loaded! Needless to say I removed it and the spikes turned into very little bumps..
The memory footprint of the W3WC.exe process still around the 50-100MB range and along with a mail server and sql server this does keep the machine busy. But it is appearing a lot more stable.
Since replacing Access with SQL Server I have seen a lot less 500 pages (none recently!) and the server isn't going down when problems occur. I have limited SQL Server to 100MB private memory max and disabled remote connections.
Thanks very much for all your help. I hope these notes help anyone else who is suffering from these kinds of problems in the future.
Cheers,
Tom





Thanks for posting back with an update, Tom. Glad to hear you've broken the back of the issues.
Hopefully you'll also get a resolution to your questions in your other thread.![]()
Thanks for the update Tom. I'm glad to hear you've tamed the "beast". It sounds like you've made some real improvements to the system too.
I'll file away that tip about IIS7 ASP->Debugging->Run On End Functions Anonymously set to True... That is really good to know.
Cheers,
Andrew
Andrew Wasson | www.lunadesign.org
Principal / Internet Development
Bookmarks