Forum Moderators: open

Message Too Old, No Replies

Out of Memory Error with Classic ASP

Windows 2003 (SP1)

         

rcristel

5:45 pm on Jan 7, 2006 (gmt 0)

10+ Year Member



I just setup a new server running IIS 6, Win 2003 (sp1) and I'm getting "Out of Memory" errors from my classic ASP pages.

I found this thread here, but didn't see a solution to the problem.
[webmasterworld.com...]

The problem only seems to happen when the memory usage goes over ~1.1GB... When I reboot of course the memory usage is set back to normal but after 6 or so hours it climbs right back up and that's when i start getting the errors.

The server is a dual xeon with 2GB of memory

Any ideas on how to fix this issues?

txbakers

4:35 pm on Jan 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what database are you using?

aspdaddy

5:54 pm on Jan 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, You havent really given much info to help. I would start by isolating the app (run in its own memory space) and then monitor dllhost.

What do your asp pages do that uses 1Gb RAM?

rcristel

5:05 am on Jan 9, 2006 (gmt 0)

10+ Year Member



Database is sql server 2000

The server runs around 50 or so sites and processor usage is pretty steady at around 25%. A few of them are very high traffic sites with thousands of users on at all times.

Another member (JuDDer) on the forum helped me come up with a work-around... That is to automatically recycle the worker processes when the memory gets to 1GB. So far it's working but the drawback is that all server session state is lost when the worker proecesses are recycled.

What other info would you need to know?

rcristel

5:09 am on Jan 9, 2006 (gmt 0)

10+ Year Member



Also, to answer the "What do your sites do that requires 1GB Ram" question...

I don't believe the sites should use that much ram. I believe the problem to be that their's a leak in memory. When I restart the server the memory usage quickly goes to around 300 or 400 MB for the w3wp.exe process and then steadily climbs to 1.1GB.

Ossifer

8:56 am on Jan 9, 2006 (gmt 0)

10+ Year Member



Are you closing your database connections?

aspdaddy

10:30 am on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using any custom VB or C++ COM objects?

These are more likely to create memory leaks than ASP Script.

rcristel

3:35 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



I've checked and double checked that all objects are being closed using the following:

RS.Close() : Conn.close
set rs = nothing : set conn = nothing

The only 3rd party objects installed on the server are jMail and aspsmartupload, which I had installed on the other dedicated server that used run these websites without this problem.

mrMister

3:52 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any excessive use of Session variables going on?

mrMister

3:53 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, are you checking all sites on the server rather than just the one producing the error? Is there any ASP.Net caching going on anywhere?

rcristel

4:05 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



All ASP based sites (around 40 or so) use the same exact software.

There are ASP.NET sites on the server but I'm assuming the problem is in the ASP based sites simply because they make up for 95% of the traffic to the server.

Of course if you think i'm incorrect in thinking that way, perhaps I should disable caching on my asp.net sites to see if that's the problem?

rcristel

4:11 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



"Any excessive use of Session variables going on? "

Well, I'm not sure what would be considered excessive. I can say that all 40 of the sites do rely on session variables.

macrost

5:10 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



Well, I can imagine this type of scenario:
40 ASP/VBScript websites that use 15-25 session variables for page navigation (to curtail use of querystring variables, each site/per user).
Now add in a ton of traffic with the default session of 20 mins, there could be an out of memory thing going on because of all the sessions.

That and any database connections are the only ones that I can come up with though.

rcristel

9:30 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



Thanks for all the help guys.

When the "Out of Memory" errors show up there is 1GB of memory used and something like 600 or 800 still available.

So another question that arises is that if the problem was that there was too much traffic, wouldn't the "Out of Memory" errors show up after ALL the memory was used up instead of after 1GB of memory was used up?

I think I'll try setting up the busiest of the 40 sites on a dedicated server and see how that goes.

mrMister

5:01 am on Jan 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I'm not sure what would be considered excessive. I can say that all 40 of the sites do rely on session variables.

bytes in session state = bytes stored per user in session state * (number of visitors in a 20 minute period)

If that's going in to hundreds of megabytes, then it's excessive use.

As for ASP.Net page caching, I'd turn it off for a 24 hour period and see what happens to your memory usage (reboot after changing the caching status)

Ossifer

11:48 am on Jan 10, 2006 (gmt 0)

10+ Year Member



If you're using IIS6, then put the Asp.net applications into their own application pool, then you can see whether the ASP or ASP.NET code is causing the increase in memory.

Actually, could you put the ASP applications in separate application pools. You might then be able to see which one is eating up the memory, although they may all be if they are similar sites..

Without code, it's very difficult to track this down though....