[mpm_winnt:warn] [pid 4412:tid 1060] (OS 64)指定的網路名稱無法使用。 :

回覆文章
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

[mpm_winnt:warn] [pid 4412:tid 1060] (OS 64)指定的網路名稱無法使用。 :

文章 yehlu »

http://orzit.blogspot.tw/2016/12/Resolv ... ailed.html

[Resolve]Apache2.4 (OS 64)指定的網路名稱無法使用 AH00341: winnt_accept: Asynchronous AcceptEx failed. 問題排除
新裝的Apache 2.4.x 版本 在windows 平台上安裝好 看起來正常,但執行一會就無法連上了
而services 都還是正常啟動的 只是無法連線,重啟後又正常但沒多久又會再次發生

查詢ERROR LOG 發現以下錯誤訊息
Apache (OS 64)指定的網路名稱無法使用 AH00341: winnt_accept: Asynchronous AcceptEx failed.


找了一下發現蠻多人都有此問題,有人提及 apache 2.0 可以在httpd.conf mpm_winnt 加上 Win32DisableAcceptEx參數即可排除此問題

<IfModule mpm_winnt.c>
Win32DisableAcceptEx
EnableMMAP Off
EnableSendfile Off
ThreadsPerChild 1700
MaxRequestsPerChild 0
</IfModule>

說AcceptEx()是一個微軟的WinSock2 API ,通過使用BSD風格的accept() API提供了性能改善。一些流行的Windows產品,比如防病毒軟件或虛擬專用網絡軟件,會幹擾AcceptEx()的正確操作。

官方也有相關的參考說明:
http://httpd.apache.org/docs/2.0/mod/mp ... leacceptex


但http.conf裡找不到mpm_winnt,看來可能不適用,網路也一堆人反應沒效果
再找了一下發現把conf/httpd.conf 之中註解掉的 EnableMMAP & EnableSendfile

#EnableMMAP off
#EnableSendfile on

#AcceptFilter http none
#AcceptFilter https none

打開並設定如下

代碼: 選擇全部

EnableMMAP off
EnableSendfile off
AcceptFilter http none
AcceptFilter https none
至於AcceptFilter ,有文章提及Apache 如有變慢的情況或是假死(就是上述提及的狀況) 可以將此參數也打開

但如果加了AcceptFilter https none不能使用ssl的情況,則要重新MARK #AcceptFilter https none(我是沒有遇過,是參考的文件中有提及,標示出來留意一下)

相關的參考說明:
http://httpd.apache.org/docs/2.4/mod/core.html
http://www.upupw.net/apachehelp/n115.html
回覆文章

回到「apache」