SQL Server 2019 on linux memory leak

李欣 李欣 1 Reputation point
2021-09-15T02:29:45.203+00:00

Does anyone can help
Our SQL Server(2019 on linux) instance runs for a period of time, the available memory will become very low.
Some big cost queries that request over than 5 Mb will be queued to request memory.
Checking dmv, it is found that MEMORYCLERK_SQLCONNECTIONPOOL takes up the most memory. What might cause this problem?
And how to release this part of memory?
132221-sql-server-memroy-stats.jpg

Thank you very mush

SQL Server | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 47,586 Reputation points
    2021-09-15T05:30:27.6+00:00

    What might cause this problem?

    What for a problem?
    It is a quite normal behaviour and by design that SQL Server allocate as much memory as it needs and it can get; that's not a memory leakage.
    You can limit the memory usage of SQL Server with the "Max. Memory" setting, see Server memory configuration options


  2. AmeliaGu-MSFT 14,011 Reputation points Microsoft External Staff
    2021-09-15T06:22:47.03+00:00

    Hi 12187783,
    Welcome to Microsoft Q&A.
    In addition, MEMORYCLERK_SQLCONNECTIONPOOL caches information on the server that the client application may need the server to keep track of. You can check with your app developer whether the connections are properly closed after usage.
    And please make sure to install the latest CU on SQL Server 2019.
    Please refer to this article which might be helpful.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Tom Phillips 17,781 Reputation points
    2021-09-15T11:36:10.69+00:00

    SQL Server does not release memory when idle. It is normal, expected and desired for SQL Server to not release memory.

    Please see:
    https://learn.microsoft.com/en-us/sql/relational-databases/memory-management-architecture-guide?view=sql-server-ver15#dynamic-memory-management

    0 comments No comments

Your answer

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