云计算之路-阿里云上:禁用Windows虚拟内存引发的重启

昨天(2013年8月6日)下午,承载www.cnblogs.com主站的两台云服务器分别自动重启了1次,由于这两台云服务器使用了负载均衡(SLB),重启并未影响网站的正常访问。

与这次重启相关的Windows事件日志如下:

云服务器1(8核CPU,8G内存):

14:36:22 —— Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: w3wp.exe (1968) consumed 3200438272 bytes, w3wp.exe (6272) consumed 3027517440 bytes, and w3wp.exe (584) consumed 643993600 bytes.

(15:09:04 —— 重启...)

15:09:56 —— Crash dump initialization failed!(这个错误是因为禁用了虚拟内存无法创建dump)

15:09:58 —— The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.

15:10:43 —— The previous system shutdown at 15:09:04 on ‎2013/‎8/‎6 was unexpected.

云服务器2(8核CPU,8G内存):

17:33:45 —— Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: w3wp.exe (5720) consumed 3194974208 bytes, w3wp.exe (2020) consumed 3034882048 bytes, and w3wp.exe (1832) consumed 517074944 bytes.

(17:40:44 —— 重启...)

17:42:11 —— Crash dump initialization failed!

17:42:12 —— The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.

17:42:40 —— The previous system shutdown at 17:40:44 on ‎2013/‎8/‎6 was unexpected.

从事件日志可以看出,在重启发生前的一段时间内,w3wp进程消耗了大量的虚拟内存(单个w3wp进程最高消耗了近3G),而我们禁用了Windows的虚拟内存,在这种情况下某种未知因素引发了系统Crash,从而造成Windows自动重启。

(你也许会问,Windows默认是启用虚拟内存的,为什么要多此一举禁用它?当时是因为发现启用虚拟内存会造成云服务器CPU占用高、波动大,详见博文云计算之路-阿里云上:两个重要突破。)

为了临时解决这次遇到的重启问题,昨天晚上我们启用了这两台云服务器的虚拟内存。

可是今天我们在写这篇博文的时候,在11:35~11:40左右,这两台云服务器竟然都出现了CPU 100%的问题,造成网站不能正常访问。

今天故障的原因还在进一步分析,如果是启用Windows虚拟内存引起的,那我们就进退两难了——虚拟内存,禁还是不禁?

posted @ 2013-08-07 12:02  博客园团队  阅读(6577)  评论(50编辑  收藏  举报