Quantcast
Viewing all articles
Browse latest Browse all 15889

Performance of a SQL Server instance occasionally goes down severly

We are maintaining an e-commerce site that occasionally has severe performance problems. Normally the site works fine for hours. But every once in a while the entire site completely locks for a few minutes and the works fine again. After the lock when I look at the log files from the web app it is filled with SQL Server timeout errors so the bottleneck is the database, also confirmed that the SQL Server process is consuming the CPU on the server (both the web app and the server are on the same server).

There was no specific action that caused this so it is not obviously bad SQL. Each individual SQL statement run is ok although not always optimal. I have previously been unable to to trace and see more details since it does not happen that often but today I was lucky. In the trace I found one statement that took about 4 minutes to run. It is a stored procedure which normally runs in less than a second. I tried this immediately after server was "unlocked" and it was back to normal. In the trace I read a CPU value of 362749 and the number of reads were 149987571 (0 writes) which is simply absurd. I ran the same statement now when the server is unlocked and the CPU value was 1310, reads were 483007 and writes were 898.

Our client is not happy and we struggle to find the causes of this. About three hours before this occasion I did a rebuild of all indexes so I do not expect fragmented indexes to be the problem. I have a suspicion though which is low memory. The server only has 2GB of memory and is constantly on 95% memory usage (SQL server has usually allocated about 1.2 GB). Could this low memory cause such problems or does anyone have other ideas of what is going on?



Edit: The server version is SQL Server 2008 R2 Workgroup Edition

Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>