记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。

Win2008  IIS7 IIS7.5 进程池经常死最终解决方案

 

作为一个服务器维护人员,经常遇到不可解决的问题,这问题一直存在,一直困扰我多时,经常凌晨1-2点起床,就为了重启一下进程池

错误应用程序名称: w3wp.exe,版本: 7.5.7600.16385,时间戳: 0x4a5bd0eb
错误模块名称: ntdll.dll,版本: 6.1.7600.16385,时间戳: 0x4a5be02b
异常代码: 0xc0000374
错误偏移量: 0x00000000000c6cd2
错误进程 ID: 0xb54c
错误应用程序启动时间: 0x01d0c0d94f91529a
错误应用程序路径: c:\windows\system32\inetsrv\w3wp.exe
错误模块路径: C:\Windows\SYSTEM32\ntdll.dll
报告 ID: 8e9b8672-2ccc-11e5-9d45-90b11c3fe265

// string method_Recycle = "Recycle"; //Start开启 Recycle回收 Stop 停止
string method_Start = "Start";
DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools");
try
{
foreach (DirectoryEntry item in appPool.Children)
{
string AppPoolCommand = item.Properties["ManagedPipelineMode"].Value.ToString();
string ManagedRuntimeVersion = item.Properties["ManagedRuntimeVersion"].Value.ToString();//,net版本号
string AppPoolState = item.Properties["AppPoolState"].Value.ToString();//当前状态
if (AppPoolState != "2")
{
DirectoryEntry findPool = appPool.Children.Find(item.Name, "IIsApplicationPool");
findPool.Invoke(method_Start, null);
appPool.CommitChanges();
appPool.Close();
var IIsMsg = string.Format("[{0}],名称:[{1}],NET版本:{2},标识:{3},当前状态:[{4}],时间:{5}\n", "Windows2008 Server", item.Name, ManagedRuntimeVersion, item.SchemaClassName, "已启动", DateTime.Now.ToString());
WriteText(IIsMsg);
ImportDataLog.WriteLog(item.Name, IIsMsg);
}
}
//lblCount_text.Text = i.ToString();
}

长期运行,给别人再CC攻击多几下都没问题,自动启动进程池!!



转载请标明出处【Win2008 IIS7 IIS7.5 进程池经常死最终解决方案】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论