Solved

Webserver (W2K3) loosing memory

Posted on 2006-07-17
9
412 Views
Last Modified: 2012-06-21
Hi folks,

I have just moved our website to a new host which is a VPS (virtual private server) with Webfusion.

Currently we are just using IIS 6 and MS SQL 2000.

The server only has 500MB of memory, or at least that's what our virtual part of the server has been allocated.  We have full remote desktop and admin rights over our virtual OS which is just like a normal server.

Now the only problem is that the server when idling has about 200MB free memory, but when we start IIS6 and SQL this drops to 100MB and then once the server has served about 20K page views the memory is around 15MB free and we start to see messages on clients like unable "HTTP/1.1 New Session Failed" presumably because the server has no available memory to commit to new sessions.

This is all a little boggling to me and I'm struggling to get my head around it.

I would expect that if a user logs on, then a bit of memory is allocated to that session and then once the session ends, the memory becomes available to serve new sessions, but the opposite of this seems to be true, and it would appear that the memory just dissapears.

Or is this not the correct understanding of how memory allocation works?.


My question is really 2 fold.

1)  Where's the memory going?, is this normal or is my ASP, and ASP.net application leaking memory?, if so, how can I figure out where the holes are?

2)  Can anyone make any suggestions in terms of throttling the amount of memory consumed by both the OS and SQL, IIS6 etc.  I have already allocated a fixed amount of just 8MB to SQL (low I know).


Any suggestions and explanations greatly welcome.

Thanks in advance,

Andrew.

0
Comment
Question by:andrewmilner
  • 5
  • 4
9 Comments
 
LVL 2

Expert Comment

by:paulvanhelden
ID: 17123280
Hi Andrew,

I don't know webfusion, but did you think of the upgrades of the windows 2003 server?
The application that is running under the IIS is your own development and is using scripts to access the SQL database? Can you drop me a screen dump of the memmory usage from the taskmanager when the 15 Mb limit is reached, also provide the virtual memory(chek in the properties of the task manager: view/set columns/Virtual memory)

See if I can help you from there.

Paul
0
 

Author Comment

by:andrewmilner
ID: 17123918
Hi Paul

Thanks for helping out.

I didn't really think of the upgrades no.  Something I obviously should have though as it's an unmanaged server.

As you'll see from the screenshot, i was in the process of checking for updates at the time of capture.  Whilst the updates were in progress, you will see that the memory dropped to 19MB.  I checked our site at this time and it came up with a 500 Internal Server error.  Re-starting IIS and SQL resolved this as the memory shot straight back up to 120MB.

I tried to add the Virtual Memory as you suggested but could not see any option for set columns.

Is there anything you can suggest from the screen shot?

http://www.andrewmilner.f2s.com/memory_issue_shot.jpg


Andrew.
0
 
LVL 2

Expert Comment

by:paulvanhelden
ID: 17166416
Hi Andrew,

Sorry for my late reply, I didn't check my mail any sooner than today.

What I wanted was not the performance tab but the processes and via the view/select columns you can select the Virtual Memory Size.
Then you know witch proces is eating your memory.

Greets, Paul
0
 

Author Comment

by:andrewmilner
ID: 17180119
Hi Paul.

It would appear that it is SQL server that's eating all the memory - it just goes up and up and not down which I would expect when sessions are closed.

Is there anyway to recycle the memory issued to SQL?, i've tried the option of IIS worker process recyling but this just effects the memory for the worker process and not SQL.

Any ideas?

Thanks,

Andrew.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:andrewmilner
ID: 17182238
On looking into it further, SQL has steadied off at 125MB and it is now W3wp.exe that is consuming the memory and not freeing much.  I have set the memory recycling for physical memory for the application pool at 125MB but this produces undesired results in terms of our web application.

Is it normal for the W3wp.exe to use this much memory?, would it also level off like SQL or just keep growing and growing?

Thanks,

Andrew.
0
 
LVL 2

Accepted Solution

by:
paulvanhelden earned 250 total points
ID: 17199193
Hi Andrew,

Please check first this article on the microsoft website.
http://support.microsoft.com/kb/894484/

Hopefully this will fix your problem.

Paul
0
 
LVL 2

Expert Comment

by:paulvanhelden
ID: 17310050
Well Andrew,

Did this solve your problem? And no W3wp will grow to a memmory shortage on the server. So degrading performance and nofree memory.

Paul
0
 

Author Comment

by:andrewmilner
ID: 17312367
Hi Paul.

I didnt implement the registry fix as described in the MS document as I dont beleive any large files / data is being sent using response.write.  Plus the server is in a production environment and so i'm a little hesitant of messing it up.

I did however set the memory recycling on the application pool to around 125MB which is at least a workable solution.  We do however get some undesirable results when the worker process is recycled while people are using the site.  It doesn't however prove to much of a problem.

Thank you for your help on this one.  I dont think I would have gotten a working solution without your comments.  Thanks again.
0
 
LVL 2

Expert Comment

by:paulvanhelden
ID: 17315921
Hi Andrew,

You're welcome.

Paul
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Learn about cloud computing and its benefits for small business owners.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now