昨天(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虛擬內存引起的,那我們就進退兩難了——虛擬內存,禁還是不禁?
文章列表