0

I have a SQL Server 2008 R2 with 8GB of ram and SQL Server is limited to 6GB. It seems to not be releasing the memory its used, and at some point future queries begin to fail. This is a mirrored server and the problem is solved after being failed over. Is there a way to force the Memory to always be released, or a known issue with limiting the memory?

There was a problem with the same server long ago, before SQL Server had a memory limit where it would use and use the memory until it crashed the server.

This is a Windows Server 2008 OS.

migrated from stackoverflow.com Apr 15 '15 at 4:55

This question came from our site for professional and enthusiast programmers.

  • "queries begin to fail" in what way? – Martin Smith Apr 6 '15 at 16:32
  • What is the workload of the server? And what makes you think that memory is not released properly? – alas Apr 6 '15 at 20:25
  • Queries fail by getting bounced back. The queries arent run in SSMS, but rather are executed by a program that uses a SQL DB. When the memory cap is reached, I have seen queries get bounced back, which is what has led me to this theory. When the DB is failed over to its Mirror, the problem disappears and all queries begin to execute again. There is only OS overhead and the SQL Server running on this server. – inFAM1S Apr 7 '15 at 17:37
0

SQL Server is kind of a memory hog. You could try clearing the cache, BUT I would highly recommend doing some reading on these commands first before you using them. From what I hear, their can be negative side effects when using these especially in a production environment.

DBCC FREESYSTEMCACHE ('ALL')
DBCC FREEPROCCACHE

Here are some links I found useful:

Difference between FreeProcCache and FreeSystemCache

https://sqlserverperformance.wordpress.com/2009/12/28/fun-with-dbcc-freeproccache/

http://jamessql.blogspot.com/2012/04/clean-sql-server-cache.html

Your Answer

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