Resource Monitor Shows sqlserver.exe using c:\pagefile.sys - sql-server

I've got a SQL Server 2008 server that will frequently (multiple times throughout the day) reports
"SQL Server has encountered 64357 occurrence(s) of I/O requests taking
longer than 15 seconds to complete on file..."
.
I've noticed that in resource monitor when filtering to the sqlserver.exe process c:\pagefile.sys is showing up fairly often.
The server currently has 40MB of memory free and 260mb available. SQL Server is set to unlimited for ram and is using most of the 32GB on the server. It's a production server I've inherited where there isn't much downtime, so I haven't been able to change that.
I assume SQL is running out of memory and going to the page file?

SQL Server has encountered 64357 occurrence(s) of I/O requests taking longer than 15 seconds
Does not indicate a memory problem. It indicates a problem with the disks used to store your databases.

It seems so. Add more ram to the server and it will be fixed

Related

IIS Server and Azure Server hang due to SQL CPU and memory high utilization and not able to process the request further

I have a services hosted on IIS port for submit some information and when it is calling by thousand of users using mobile app on same time, Server is going to stuck and not able to response for the request.
At this time I observe in task manager that SQL took high utilization and memory approx. 70-75 % CPU and memory .
Due to this we need to restart the SQL server daily in morning and evening .(I know this is bad idea for performance and statistics but server hang up)
I have made the API using .NET framework and SQL server 2012.
Any idea what i can do to handle this issue?
The following methods can usually be taken to solve this problem.
Optimize the code of your application, especially the frequent connection and closing of the database. Each new connection will consume cpu resources, so if there is an idle connection, it is better to actively close it instead of waiting for GC to recycle it. For data queries, use index queries as much as possible, especially when there is a lot of data. I think this applies to you, because you will have a large number of users and user data.
Due to the special design mechanism of SQL Server, 100% of the digital memory on the server will be consumed by default, which will cause performance degradation. You can set max server memory to limit the amount that SQL Server allocates to the buffer pool, which is usually the largest memory consumer.
Effects of min and max server memory
As Lex li said, moving the database to a separate computer is a good way. Especially when there is a lot of user data and data processing. IIS and SQL Server are on the same machine. The server not only has to process requests and responses to applications, but also allocate resources to SQL Server to process queries. It is easy to encounter performance bottlenecks.

SQL Server 2008R2 super high memory consumption - many stolen pages and huge log file

We have a SQL Server 2008 R2 instance running on a Windows Server 2008 R2 machine. The SQL instance has 12 GB RAM allocated to it. Currently (and probably typically) we are sitting at 47 concurrent connections. The server has a handful of DBs residing on it, but only one is really used. This db is 33 GBs with a log size of 89 GB.
The server physical memory is steady at 98%, and our application response time is bad. Most of the memory used by SQL Server are stolen pages. I'm not sure how to correct this. Our indexes and statistics are all basically brand new/recently rebuilt.
I'm at a bit of a loss as to how stolen pages are occurring, why they remain so high, and how to deal with this. Is the log related? It's nearly 3 times the size of the DB. We're reaching a critical point, so any and all help would be much appreciated. Thanks!
SQL Server, by default, will take up all memory unless you tell it not to in the properties of the Server in SSMS (Right click the server and choose properties, go to memory on the left and set the max).
For the log file size, it matters how the application is logging. Right click the database and choose options, look at the recovery model. I would Google the different types to match the type to your database need. If it is Full logged and you are not taking Transaction log backups, the log will just grow and grow. In that case, look at implementing Ole Hallengren's widely used scripting for backups: https://ola.hallengren.com/

SQL Server error: the paging file is too small for this operation

I'm running SQL Server 2012 Express (v 11.0.3000) on a virtual server running Windows Server 2008 R2. Over the past couple of weeks, the SQL Server has been randomly crashing or hanging. Looking at the SQL server log, it seems that right before the crashes I'm getting an error saying "Could not load the DLL dbghelp.dll or one of the DLLs it references. Reason: 1455(The paging file is too small for this operation..."
I'm confused as to whether this is referencing the SQL Server paging file or the Windows paging file. Because this is a virtual server, Virtual Memory is disabled in Windows system configuration. When I go to the task manager, it shows I have 94,089 MB of free physical memory. I found an article stating that in a virtual server, all the memory is virtual anyway, so to the virtualized instance of Windows, it all looks like physical memory. So if the server has this much memory available, I don't understand why SQL Server's paging file would be too small.
When I search for this 1455 error message, I found this article (http://www.sqlservercentral.com/Forums/Topic1487760-5-1.aspx) which suggests reducing the max server memory. I assume it means reducing the maximum server memory setting in the Server Properties in SQL Server. Currently this is set to 1024 MB. This seems counterintuitive to reduce the server memory in this situation. Plus, 1GB doesn't seem like a lot.
When I go to the General tab of SQL Server properties, the value for Memory is 4096 (MB).
Below is a screenshot of the SQL Server log:
enter image description here
thanks!
The DLL error is just a consequence of a low memory condition. SQL Server is not able to allocate dinamically more memory to processes.
Maximum Server Memory is a parameter used to define the maximum amount of memory sql server can allocate.
You have to raise it: 1024MB is a very low value for a producton database.
See more details here: https://msdn.microsoft.com/en-us/library/ms178067(v=sql.110).aspx
SQL Server Express is free but has limitations like maximum usable memory: https://msdn.microsoft.com/en-us/library/ms143685(v=sql.105).aspx
...and it's 1GB. I'm sorry but probably you have to upgrade to Standard. :(

SQL Server DB Engine Memory Leakage

We have a Windows Form Application and the back-end of the application is SQL Server Express 2005/2008. Our application can be installed on Windows XP SP3/ Windows Vista/ Windows 7.
We have observed huge memory leakage in SQL Server Express.
Normally, there are two process running even if the application is not used by the user:
A polling process to check the availability of files. (If files are not available then, only one query is fired to check some configuration setting)
A Scheduling process. (This process fires a query every minute to check for any scheduled task)
We have observed that the memory usage of the SQL Server (sqlsrvr.exe) keeps on increasing. In around an hour, the memory usage reaches upto 1GB and it never comes down.
We have also noticed that, if the interval of the polling process is increased, then the memory usage increases gradually but, it does increase.
The higher memory usage by SQL server downgrades the machine performance and the performance of all other applications running on the machine.
Please provide suggestions to control the memory usage of SQL server in this case.
PFB the details:
Software causing issue :SQL Server 2005/2008 Express editions (named instance)
Operating Systems on which issue can be simulated : Windows XP SP3/ Windows Vista/ Windows 7
Regards,
Abhineet
SQL Server is designed to take all the memory on the system and use it for its internal cache. You should never run anything else on the same machine as SQL Server. This is not a leak, is the intended and desired behavior. By design. See Memory Manager Architecture
As a special case SQL Server Express edition limits its internal buffer pool size to 1Gb. The buffer pool is not the only memory consumed by SQL Server though. You can further limit the SQL Server buffer pool size by specifying a value for max server memory.

connection timeout

My method executes lots of asynchronous SQL requests and I constantly get connection timeout exceptions. What else can I do except increasing the connection timeout value and proper indexing? I mean with the database part, not with the code part. Can't change the code part. Besides, the application is running fine on different servers, but only I experience those timeout exceptions on my pc and local MS SQL Server 2008 R2 database (which is also on the same PC). So I think this is clearly a performance issue since the connection timeout is already set to 3 minutes. Maybe there is something I can change on the server? Maybe there is a number of simultanious requests constraint? Each of my requests needs clearly less that 3 minutes, but there are about 26 000 of them running asynchroniously, and only I experience those problems on my local PC and local DB.
I've run the process monitor and I see that at the time when my code starts the SQL Server eventually consumes 200 MB of RAM and takes up about a half of CPU processing time. But I still have 1 GB of RAM free, so this is not a memory problem.
I think the number of connection can be the cause. Make sure you close the connection properly or try to reduce the amount of them. You can also use pipes, which will overcome the limitations of usual connections.

Resources