Overlapped Recycle and Application_Start

那年仲夏 提交于 2020-01-14 02:31:47

问题


I have an asp.net web app using AppFabric for distributed caching. On Application_Start I initialize my connection to AppFabric. This generally takes milliseconds which is perfectly acceptable. On occasion it can take up to 30 seconds to connect.

Prior to a recycle I have a worker process (lets call it wp1). I was under the impression that during a recycle wp1 handled all incoming requests while wp2 was spinning up. I would assume wp2 then becomes responsive when the Application_Start code completes.

Based on my logging, this is not the case. It appears that during a recycle wp2 starts handling requests the moment Application_Start begins and not when it ends. So what do I do to ensure my app doesn't have the 30 second downtime?

cheers in advance

来源:https://stackoverflow.com/questions/4338340/overlapped-recycle-and-application-start

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