There is insufficient system memory in resource pool ‘internal’ to run this query.

There is insufficient system memory in resource pool ‘internal’ to run this query.

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0Share on Reddit0
Even though you might get the above error message for different occasions, one thing is for sure, it has to do with memory management. ๐Ÿ™‚

SQL Server allows you to limit the maximum memory that can be utilized by its Database Engine. You can use this feature in order to allow the OS to have access to memory that cannot be used by SQL Server and thus ensure stability. However you have to remember to re-evaluate this setting in the event of a memory upgrade on the machine.

You can perform the above action as follows:
Right click on instance name in SSMS – Select “Properties” – Select the “Memory” tab. You then get the below dialog (in this example I have set as maximum server memory 3GB):

The above method is a way to ensure OS stability by not allowing SQL Server to consume all memory in any case and by leaving an amount of memory available for the OS.

Now, in the case you get the “There is insufficient system memory in resource pool ‘internal’ to run this query.” error you can try the following actions:

Action 1
Run the T-SQL command:
ALTER RESOURCE GOVERNOR RESET STATISTICS


As described on an MSDN Library article, the above command will cause Resource Governor to resets statistics on all workload groups and resource pools including the “internal” resource pool.
Action 2:
If the above action does not solve the issue you can try to free-up more memory and eventually upgrade the memory capacity of the machine.


Recommended eBooks on SQL Server:

Tuning SQL Server: eBook by SQL Server MVP Artemakis Artemiou
Tuning SQL Server: eBook by SQL Server MVP Artemakis Artemiou
Administering SQL Server: eBook by SQL Server MVP Artemakis Artemiou
Administering SQL Server: eBook by SQL Server MVP Artemakis Artemiou
Artemakis Artemiou
Artemakis Artemiou is a Senior SQL Server Architect, Author, Software Developer and a Microsoft Data Platform MVP. He has over 15 years of experience in the IT industry in various roles. Among other, via his initiative SQLEBooks.com, Artemakis authors and publishes eBooks on different topics on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Additionally he is the founder of the SQLArtBits initiative that aims to provide the technical community with simple, yet powerful and high-quality SQL Server tools. Currently, the highlights of these tools are DBA Security Advisor and In-Memory OLTP Simulator. Artemakis's official website can be found atย aartemiou.com. Artemakis's blogs can be found at: SQLNetHub.comย and TechHowTos.com.