Update: I found a workaround that seems to work for now. See 1 post below...
I have set up a website with a webstore using classic ASP (because the cart system is VPASP, a classic ASP based cart system with full source code). I have the site hosted on a HostMySite.com Windows VPS running 384MB memory.
All my site is hosting is the website w/ shopping cart, Smarter Mail, and Smarter Stats.
My problem: I recently discovered serious memory issues. The server started going offline periodically and I traced the problem down to running out of memory. Doing some testing with task manager, I figured out what the problem was.
My Application Pool processes (w3wp.exe) grows tremendously with each and every seperate .ASP file accessed by a webuser. Once all my Commit Charge is used up (384megs), the website goes down with an error "HTTP/1.1 New Session Failed", and remote desktop accesses no longer work. The only solution is to reboot the server.
With the shopping cart (VPASP), if I navigate around its various .ASP pages, the size of w3wp.exe builds to around 70MB. If I log in to administration and navigate around to all the different admin .ASP pages, the size goes even that much higher. Basically with each and every .ASP page that is linked into VPASP's core files, I get a 2MB - 10MB increase in the size of w3wp.exe. So if a user is browsing the site and causes w3wp.exe to go up to like 70MB, and say I'm doing some adminstration on the back end adding another 50MB, then someone opens Smarter Mail, POOF - OUT OF MEMORY. This problem is compounded by the fact that my site content pages are seperate .ASP files linked to VPASP's core files so I can use the system's user, cart, and session management on my content pages. So, the more content pages I add, the more a user can browse, the bigger w3wp.exe will grow and then I'll run out of memory.
Additionally, even if two .ASP files are IDENTICAL in two seperate folder, each .ASP file will bloat w3wp.exe up by an equal amount. I was planning on running several iterations of the site for different regions, so the possibility exists to run out of memory EXTREMELY fast -- if a webuser in Japan bloats w3wp.exe up to 70MB, then someone starts browsing the US site, we're going to run out of memory!
I've done a ton of research and digging around on this problem and here's what I think is really happening. (Please forgive my ignorance if I'm not totally correct as I am not an ASP or IIS expert):
I think I've boiled the problem down to Memory Template Caching (something ASP does to speed up processing) by setting up System Monitor and monitoring ALL Active Server Pages counters.
Template Caching explanation:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a9171159-c801-4705-b8a9-9eecf58a892f.mspx?mfr=true
So here we go:
When an ASP page is accessed, IIS caches the whole of the source code, including ALL linked #include pages. The stupid thing is that even if the #include pages were already included by another ASP page previously accessed, THEY ARE CACHED AGAIN!
What does this mean? Every single ASP page that links to shop$db.asp (VPASP's core files) and all the other #included pages are cached REDUNDANTLY! The settings for changing the ASP Memory Template Caching go by # of pages, NOT memory size. (Default is 500 pages in memory). It's not smart enough to dump previously cached pages when it runs out of memory apparently -- but it will supposedly dump previous pages when you hit the # of pages limit (500). Now it's only taking a dozen or so pages to hit 70 megs, so this is absolutely a big problem.
There also must be some CRAZY overhead. I created some test pages just to figure out how ASP was working. I created a 10MB asp file (just a ton of commented out code) just to see what would happen. Upon access, the App pool (w3wp.exe) explodes to 70MB. Seems stupid the Memory Template Cache is 7x bigger than the original ASP file...
With all that said, I see no solution to the problem. VPASP uses very large ASP script files that are #included by each and every .ASP file you access. This is going to make it nearly impossible to host more than one VPASP store on an affordable VPS system (HMS.com, 384MB memory). And my site design uses seperate .ASP pages for every content page linked to shop$db.asp so I can maintain login/session interface among all my pages. Once the number of pages increases in the future, the memory requirements to cache the pages after accessing them will bring any server to its knees...
Also, I have seen the two articles below, but neither makes any difference to w3wp.exe's size:
http://support.microsoft.com/kb/916984
http://www.smartertools.com/forums/p/16716/44530.aspx
Please give me some ideas.