Why server application service Caton? The original memory exhaustion is to blame!

       Friends who did the operation and maintenance are likely to encounter: a server application running slow problem, and ultimately all departments came to the door, .

       I am here today to share with you a case and their solutions. I used a lot of friends also with anguish is such a thing , but my server memory 64G ah, this is not enough to eat it .

       Then I open the Task Manager to see the original memory exhaustion angered disaster, memory usage 99%, CPU use varied between 70% to 100%, if time access to applications, servers, flew into a 100%, idle slowly come down a little. Look inside the change process, you will find the SQL Server process takes up 99% of memory, then I suddenly realized that database pound ghost .

       Rascal found, but have not found how it was mischief, according to the analysis of the phenomenon, each service will be such a problem restarting both had some time, and such problems arise basically a week later. After query data to know when the data in SQL Server is running will have visited cached to improve access efficiency again, that memory is exhausted roots had been found, !

      Analysis here, a lot of friends who may have a solution, is to set the database itself can set the size of its memory use, inspiration flew to the rush to set the memory size of the database used to tell you briefly about the following configuration to SQL Server 2012 as an example:

1, first open the database manager;

2, then on the right select the server name attribute;

3, and then click Memory, enter the memory configuration interface options

After setting, after a period of operation to another problem has emerged, although after some time the database server is running the memory configuration finished, but it does not appear Caton phenomenon server crashes, you can still use the service to run slow.

Ah ah ah    can only be a big move

Set the periodic restart SQL Server 2012 R2 service, to tell you about the following methods:

1、建立一个重启SQL Server 2012 R2服务批处理文件。

首先,新建一个txt文档

接着,在刚才建的文档中输入一下命令

    net stop sqlserveragent
    net stop mssqlserver
    net start mssqlserver
    net start sqlserveragent

最后,保存文件名为ResetSqlServer,扩展名为bat

2、设置一个计划任务(我服务器系统是Wondows Server 2012),定时自动执行上面新建的批处理文件。

首先,进入控制面板,点击“查看方式”选“小图标”

接着,单击管理工具进入界面,双击“计划任务程序”,进入如下界面

再接着,单击创建任务,并输入任务名称,点确定保存

再接着,新建触发器,设置好后,点确定保存

提醒:开始时间一定设置成空闲时间

最后,新建操作,点击浏览按钮,选择刚刚建好的批处理文件ResetSqlServer.bat

到此为止,大功告成,修成正果!


发布了1535 篇原创文章 · 获赞 586 · 访问量 237万+

Guess you like

Origin blog.csdn.net/sD7O95O/article/details/104058084