I have a Windows Server 2008 webserver with two web applications and two windows services. It is essential that the server never uses more than 2 GB of memory and the server can have no pagefile. What is the best approach to accomplish this?

I am considering writing an extra Windows Service to monitor the other processes and restart the two w3wp.exe processes and the two Windows services whenever needed. However, I am hoping for a better and more robust solution.

I know I can limit the w3wp.exe processes by recycling the application pools based on memory consumption, but that doesn't solve the problem entirely because the two windows services could spend all memory on their own. I've already tried limiting them each to 300 MB but they still occasionally exceed 2 GB RAM usage.

Rewriting the applications involved are not options.

  • 1
    What is the problem you are trying to solve by limiting the memory? Dec 8, 2011 at 18:14
  • 1
    The server IS limited to using 2 GB of memory and there CANNOT by definition be any pagefile, because that's just how Hosteurope works. When it runs out of memory, the application pools crash and I get 503 error. Dec 15, 2011 at 19:46

1 Answer 1


I think you are not solving the problem in the proper way. Limiting the memory for an application that was not written by you could make it unstable.

  • removing the pagefile will definitely make the server perform worse.
    – Top__Hat
    Dec 8, 2011 at 18:31
  • I know that both the web applications and the windows services have no problem being restarted once in a while. Dec 15, 2011 at 19:47
  • Top_Hat, there is no pagefile and there cannot be any, that's just an annoying fact on the environment I'm working on. Dec 15, 2011 at 19:48

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.