IISNode periodically fails with HTTP 500.1001 on Azure

倖福魔咒の 提交于 2019-12-21 17:57:49

问题


The site periodically becomes unavailable with HTTP 500 error. All I could find from the logs so far is:

ModuleName iisnode 
Notification EXECUTE_REQUEST_HANDLER 
HttpStatus 500 
HttpReason Internal Server Error 
HttpSubStatus 1001 
ErrorCode The system cannot find the file specified. (0x2) 

Note that response time in this instance is around 38 seconds. I suspect this happens because IISNode process goes to sleep and the when it wakes up it fails on the first request after long time out. I created Azure WebJob that pings the site every 15 minutes to keep it alive and it seemed resolved the issue. I am just wondering if there's a better solution.


回答1:


There is a GitHub issue here that addresses this issue. The problem is due to the nature of how IIS lazily initializes the node process. Requests may be dropped if initialization takes too long. The suggested solution is to increase one or both of the values for maxNamedPipeConnectionRetry and namedPipeConnectionRetryDelay in your web.config or iisnode.yml file. The GitHub answer goes into more detail about why those values are relevant.



来源:https://stackoverflow.com/questions/27760975/iisnode-periodically-fails-with-http-500-1001-on-azure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!