I run Sql server instance and a dot.net core app on the same server for a while and today is the first time I came across with this issue, my website doesn't get data from the server and it gets this error:

There is insufficient system memory in resource pool 'internal' to run this query. Error: 596, Severity: 21, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped. A severe error occurred on the current command. The results, if any, should be discarded.

and this error as well:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

The sql server version:

Microsoft SQL Server 2017 (RTM-CU16) (KB4508218) - 14.0.3223.3 (X64)
Jul 12 2019 17:43:08 Copyright (C) 2017 Microsoft Corporation Express Edition (64-bit) on Linux (Ubuntu 16.04.6 LTS)

I typed the top command and I got this:

It used to work fine for more than 3 months without any error.
How can I find out what is causing Sql server to use all this cpu all of a sudden?

1 Answer 1


You should familiarize yourself more with top - it shows > 100% because it displays this data as a percentage of a single CPU and presumably you have more than one of those.

I'd recommend a more robust monitoring setup for your SQL Server. The MS CAT team has a good article on how to do this for SQL Server on Linux.

Finally, stop running your application and SQL Server on the same host. Your error is actually concerning a lack of memory, of which you are probably capping SQL Server from using and/or it is competing with the application for. More resource contention issues like this are probable in the future with keeping both on the same host, as well as security concerns, patching difficulties, and more.

  • Thanks for the answer I wiil check that link, it's on the same server because of it used to work with 2gb memory and mysql , I doubled the memory and it barely works...
    – grin
    Commented Sep 13, 2020 at 12:36
  • 1
    The timeouts might also be related to performance problems in your design/queries, SQL Server works differently than MySQL when it comes to the query engine. Commented Sep 13, 2020 at 12:56
  • With 2 Gb of RAM it is really very short. SQL Server Express can use until 1.4 Gb... RAM is used also by OS, and 64 bits applications are naturally using more bytes because of 64 byte alignment. So your application won't have sufficient memory to run.... Try with 4 Gb... This a the minimum for me.
    – SQLpro
    Commented Sep 14, 2020 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.