Solved

Virtual Memory Too Low

Posted on 2006-11-14
12
2,389 Views
Last Modified: 2012-05-05
I have just started using Windows 2003 Server R2 Standard Edition and starting to get a little frustrated. I have installed the OS on a brand new HP ProLiant DL380 G5 which has dual Xeon processors and 8GB of physical RAM, 8 x 72GB SCSI Drives which a RAID Array, 2 Mounted Drives.

I have installed DNS, DHCP, File Server, Application Server, Exchange 2003, ISA 2004 and SQL Server 2005.

When the server started I got no errors or warnings appearring in the Event Log until after I installed Exchange 2003. They Support Tool identified the need to add /3GB  /USERVA=3030 to the boot.ini file which I did and I also set the Virtual Memory Page File Size to 4096 on Drive C and 4096 on Drive D.

Again all the errors went away, PHEW, but hang on when I left the server for an hour and went back I got an error saying 'Virtual Memory Too Low' the system was going to try and increase the Page File Size. This lead to me struggling to log back in and shut the server down. I checked the Event Log and loads of errors due to components not able to load, etc... I cleared out the Event Log and rebooted.

When the server rebooted, again no errors or warning in the Event Logs but sure enough leave the server for any length of time and I would get a warning again about Virtual Memory being too low and again I had to reboot.

I'm sure it is something straightforward I am missing, but can anyone out there help?

Many thanks in advance, NewAS.

0
Comment
Question by:NewAS
  • 5
  • 4
12 Comments
 
LVL 2

Expert Comment

by:thelastoftheend
ID: 17941617
Let's start by narrowing down what application is causing this. In Task Manager (Start-->Run-->Taskmgr), go to the Processes tab and sort by clicking on the "Mem Usage" column header.  What process is allocating the most memory and how much?
0
 

Author Comment

by:NewAS
ID: 17941898
I've just tried logging in remotely and guess what I can't, this happened earlier today. I bet when I get to work tomorrow morning the same Virtual Memory warning is displaying on the monitor.

I will let you know the answer first thing in the morning. Thank you for responding so quickly.
0
 

Author Comment

by:NewAS
ID: 17946028
Ok, got to work and sure enough the Virtual Memory Too Low was displayed and I had to restrart the server.

After the server rebooted I ran taskmgr as you suggested. Here are the results:

mshta.exe 11,888K
explorer.exe 10,692K
ccApp.exe 5,384K
winlogon.exe 4,500K
sqlmangr.exe 4,488K
taskmgr.exe 3,616K
csrss.exe 2,772K
rdpclip.exe 2,636K
cpqteam.exe 1,864K
oobeckhk.exe 1,760K

Oh I forgot I have got Symantec AntiVirus Corporate Edition.

Right I just noticed a pattern forming which may help.

Ok, I rebooted the server and logged onto the server as the Administrator in the server room. An hour later I use Remote Desktop Connection from Programs > Accessories > Communications. Now I could see the desktop of the server and I ran taskmgr to get the details which I have listed above. I then closed the Remote Desktop Connection application and a few minutes later tried using the Remote Desktop Connection again to connect to the server. This time I could not connect, went back to the server room and sure enough a Virtual Memory Too Low warning appeared. I tried to run taskmgr again but the application failed, so I had to restart thre server.

What on earth is my remote connection doing to the server or is this just a coincidence?
0
 

Author Comment

by:NewAS
ID: 17946566
Ok, the puzzle continues, I have just installed the Admin Pak on my Windows XP Pro system. I used the Remote Desktops application instead. I restarted the server and did not login in the server room but through the Remote Desktops application.

sqlservr.exe 121,112K [Administrator]
Rtvscan.exe 37,932K
ReportingServicesService.exe 37.752K
sqlservr.exe 28,088K [SYSTEM]
w3wp.exe 25,984K
wspsrv.exe 23,688K
wsusservice.exe 23,508K
msmdsrv.exe 23,268K
MsDtsSrvr.exe 13,224K
inetinfo.exe 13,176K
svchost.exe 12,408K
lsass.exe 12,624K
store.exe 12,472K
explorer.exe 12,384K

Now since I started recording the aboe figures I noticed that the second instance of sqlservr.exe running as SYSTEM increased from 28,088K to 78,572 and is still climbing. All other services have either stayed the same or marginally fluxtuated up or down.

Is SQL Server 2005 the cause of my memory problems and why are two instance of the same executible running. The second sqlservr.exe instance is now at 95,116K and still increasing.

Many thanks in advance, NewAS.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:NewAS
ID: 17946575
Oh, forgot I have WSUS running as well, sorry.
0
 
LVL 2

Expert Comment

by:thelastoftheend
ID: 18020578
Sorry for the slow response.... SQL Server will run a seperate instance of the sqlservr.exe process for each SQL database that is running. In addition to databases that you have manually created/installed, many programs use SQL as their back-end database and install an SQL instance during the installation of the program. Most programs that do this install the free version of SQL called MSDE, which is a scaled-down version of SQL 2000.  You can typically determine which programs are using SQL by looking at the database name: Go to Start->Run and type Services.msc. Scroll down to find the services that start with MSSQL$ - the latter half of the service name is the name of the database, and usually reflects the name of the program using it, such as MSSQL$BackupExec for Backup Exec software.

If only one of the sqlservr.exe processes is accumulating in memory usage, you need to isolate which database is causing this. Stop one of the MSSQL$ services and one of the sqlservr.exe processes will disappear, allowing you to isolate which database is associated with the memory leak.

As far as resolving the memory leak, look for answers within the application that is attached to the database. Are there numerous users accessing the application, are there updates or service packs available for the application that may resolve the problem? Call technical support for the application and see if they can help - it may just be a setting that needs to be changed. Unfortunately, I've had a couple software vendors who want to insist that this is a problem with SQL Server and not their product. They will reference the fact that SQL Server will allow the database to utilize, by default, up to 2 GB of RAM. My argument is that although SQL Server will allow this, it does not mean that an application should be utilizing that much RAM - there is something in their program that is using that memory.

One alternative, as a last resort, would be to limit the amount of memory that SQL Server is allowed to utilize (lowering the 2GB default). I do not recommend this if you suspect a true memory  leak, as it does not solve the underlying problem that an application is still trying to utilize more memory. If you were to limit the memory to, say, 400 MB, the application would still be trying to utilize more memory and will likely slow your system down trying to do so.

At the same time, it could be there is no memory leak at all. Microsoft does say that SQL uses as much available memory as it can, releasing it to other appliacations as needed. If this was the case though, I don't think you'd be having problems with virtual memory. See the Microsoft article that explains this (as well as how to limit memory usage in SQL 2005: http://support.microsoft.com/kb/321363.

Also, here is a link that describes how to limit MSDE memory usage: http://thelazyadmin.com/index.php?/archives/56-Limiting-MSDE-Memory-Usage.html. When running the "osql" command in the article, replace servername\MSFW with the name of your database, i.e. servername\BackupExec.

Also note I'm definitely not an SQL expert! Don't do any of the above without making sure that you have a good server backup and that you're not affecting users who may be using the applications you're working on. Good luck!
0
 

Author Comment

by:NewAS
ID: 18363941
I have checked services and found MSSQL$MSFW does this help?
0
 
LVL 2

Accepted Solution

by:
thelastoftheend earned 250 total points
ID: 18365278
That's the MSDE database for the ISA Firewall.  Once again, Microsoft says it is normal for it to use a lot of memory but that it is designed to release the memory to other applications as soon as they request them.  But if you'd prefer, you can set a limit on how much memory MSDE uses. Just don't set it so low that it can't handle the requests it needs to process. Here's the link for how to do this: http://support.microsoft.com/default.aspx?scid=kb;en-us;909636
0
 
LVL 2

Expert Comment

by:thelastoftheend
ID: 18365323
I just noticed from one of your first posts here that you're also running WSUS.  If WSUS is deployed to your clients, it's possible that this is using up a lot of memory as well when they connect to the server to download updates. Especially if the clients were turned off at night and they're trying to update all at once in the morning. Just a thought.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I have never ceased to be amazed how many problems you can encounter on a fresh install of a Windows operating system.  This is certainly case in point& Unable to complete ANY MSI installation.  This means Windows Updates are failing and I can't …
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

12 Experts available now in Live!

Get 1:1 Help Now