Sql Server not releasing memory even after closing .net application in which we are doing sql operations

Muhammad Usman 41 Reputation points
2020-11-03T11:59:22.583+00:00

Hi, we are facing some issue related to sql server memory release. We are using sql server 2017 and above.

We have a .net application which is performing a lot of transactions on Sql server in specific use case, issue is while we are using application Sql server memory usage getting increased which is logically true, but while we are not using application or event of we stop/close application sql server memory usage is not getting decrease. I found some solution to limit its max server memory, but we don't want to do that, because at the time of need we want to use maximum memory after usage we want extra memory get released. Any one who know/face this type of issue or have knowledge about this, please let us know.

Note: if we restart sql server services or restart sql server that time memory release happened else not releasing memory.

Thanks.

Developer technologies | Transact-SQL
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. tibor_karaszi@hotmail.com 4,316 Reputation points
    2020-11-03T12:03:07.737+00:00

    SQL Server doesn't release memory unless there is memory pressure. How would SQL Server know that nobody want to read the data is has spent so much time reading from disk into cache? SQL Server has no knowledge that you don't' intend to read those pages.

    I.e., the behavior you see is by design.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tom Phillips 17,771 Reputation points
    2020-11-03T12:33:35.947+00:00
    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.