SQL Server 2005 – Insufficient System Memory to Run Query

memorysql server

One of our SQL Servers, which has been running stable for quite some time (years), has recently been throwing insufficient memory errors. From the Application Event Log, we see:

Event ID: 701

Description: There is insufficient system memory to run this query.

Our team that manages this server is made up of mostly developers that double up on the sysadmin duties. However, our primary expertise is development. That being said, we are at a loss on how we go about troubleshooting this. We've been scouring forums and whatnot and haven't found anything that matches

So, here are some more details to aid in troubleshooting:

  • Our Minimum server memory is set to 0.
  • Our Maximum server memory is set to 2000.
  • Total Physical Memory is 3,325.85 MB (from sysinfo).
  • Total Virtual Memory is 7.10 GB (from sysinfo).
  • We were not using AWE to allocate memory, but we are now to see if it makes a difference.
  • This error was thrown by a job that was backing up a transaction log, not running a query.
  • We have many linked servers. The types of RDBMS on the other side are SQL Server (2005 and 2000), Oracle 10g, and OSI PI systems.
  • It is intermittent at this point. We cannot seem to correlate any time or event to the errors.
  • Of course, rebooting seems to make it go away for a while, which makes sense due to the nature of the error message.
  • This server triples as an application server (a couple of Windows Services) and a web server, as well as the database server.

EDIT:

We are on SP3. Most of the posts we found were pre SP1, which doesn't apply to us.

SELECT  SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

returns

9.00.4035.00 SP3 Standard Edition

Best Answer

I would suggest using the -g startup parameter as well. It seems to work for most people and will probably work for you as well. My only concern would be that the underlying issue may not be resolved. For example if there is a memory leak due to a linked server, and the MTL is increased to 512Mb will it just be a longer period between memory issues? I don't know the answer to that but I tend to agree with UndertheFold in that a perfmon may be a good start.

Related Topic