I've ran into a big memory issue that is causing major trouble on the server.

On the machine there is Windows 2003 x86, SQL Server 2005 and an IIS on which many applications are running. 8 processor system with 4Gb of RAM. The main problem that appeared recently is that the memory usage is always high, about 3.8Gb. After some time after reboot it starts to grow to 3.8 - 4Gb, and then some apps stops responding to the requests, sql server query execution is slowing and the only thing that is left to be done is reboot, which is bad.

When I look into the task manager on processes, the sum of consumed memory is hardly greater than 1Gb. When i opened the vmmap monitor, it shows me the same thing.

SQL Server maximum memory is 2Gb. Page file is 2 - 4Gb.

What ideas do you have about how can I figure out what consumes so much memory?


SQL server is probably your culprit. That beast will try to use as much memory as possible in order to optimize itself. On the MSDN forums there is a conversation about a problem much like yours. On MSDN itself, there are a couple of articles that will help you manage the memory used by SQL Server.

Server Memory Options Monitoring Memory Usage

Good luck with your issues and hope this helps some.

  • Working set of my sql server is just 160Mb and it's showing 160Mb in Task Manager too. Previously when I worked with SQL Server and it consumed a lots of memory it always showed up in Task Manager, so i believe it consumes 160Mb as it is showed, not more. – GregoryM Feb 5 '10 at 20:37
  • In the end you were right. After fixing a few leaks in IIS applications, the problem was still there, so i decided to take a closer look at the SQL Server settings and figured out that the memory usage was not limited. After setting the limit to 2Gb, memory usage came to a normal state and seems that it isn't getting any higher all day long. – GregoryM Feb 11 '10 at 15:26

I'd be very surprised if it wasn't IIS. What applications are you running there?

  • +1, I've seen exactly this same symptom before and it was down to app pool/web garden configuration (too many of them). – Maximus Minimus Feb 5 '10 at 20:27
  • There are many web-services and a few web sites that was written by another developers, not me. I suspect that they really can cause this kind of troubles. But to get rid of them I'll need to profile many .NET code, this can take a long time and much longer to fix it. I was wondering how can I see what process or processes consume the biggest amount of memory... – GregoryM Feb 5 '10 at 20:30
  • @mh - Hm, you are saying that many app pools created on IIS server can cause the problem with memory? I have around 10 of them each for different set of apps. – GregoryM Feb 5 '10 at 20:32
  • yes too many app pools can cause excessiv ememory usage. There probably isn't a need for that many app pools. Try changing it to 1 per app pool ID and 1 per .net framework version – Jim B Feb 5 '10 at 20:41
  • Sounds familiar. Try reducing the number to about 3 or so, putting apps that can live happily together into the same pool, and not only will RAM usage go down, but the apps should also go a lot faster. I'd be interested in hearing how you get on with this. – Maximus Minimus Feb 5 '10 at 20:42

Look at the performance counters Process category. This category has one instance for each process in your server and the individual counters will show you the memory allocated, the virtual address space size and the working set size for each process. Once you find out which process consumes all the memory (assuming memory is consumed in user mode) then you can target your investigation. Both IIS/ASP and SQL are serious memory hungry processes, but the troubleshooting an investigation is vastely different between them. So its very important to fist find out which one it is, before you start blindly changing settings.

And as a side not, you should not run IIS and SQL on the same box.


First make sure that task manager is showing you the processes from all users. The memory shown in task manager should be pretty close to the memory utilization on the box. that will tell you what processes are eating up the ram. It will likely be IIS that is usig up the ram and per my comment you should reduce the number of application pools to what is required (1 per identity and 1 per framework version)

  • The Task Manager is showing all processes from all users. But the captured memory by the processes is only about 1Gb, but Total 'Commit Charge' is still very close to 4Gb. – GregoryM Feb 6 '10 at 9:03
  • Does comit charge total = mem usage? – Jim B Feb 6 '10 at 16:29
  • As far as I know, yes. All other memory watchers show that the remaining free physical memory is very low. – GregoryM Feb 6 '10 at 20:06
  • If commit charge = mem usage then the processes really should add up to the used memory. Can you run tasklist command and post the results? – Jim B Feb 7 '10 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.