Automatic start of Azure webrole after deploy

后端 未结 2 1980
名媛妹妹
名媛妹妹 2021-02-09 04:27

A have an azure webrole with a test page and a service in that role. After publishing the role it doesn\'t start automatically, only at first use. So if the role is shut down fo

2条回答
  •  生来不讨喜
    2021-02-09 04:51

    A role is typically restarted about once a month, for OS maintenance of either the Guest or the underlying Host OS. What you're more likely to see is AppPool timeout due to inactivity, which will exhibit the same type of initial-hit delay. The default timeout is 20 minutes. You can change the timeout via elevated startup script, with something like:

    %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
    

    I discussed this in another SO question as well.

提交回复
热议问题