什么是工人进程回收......?

发布于 2024-11-05 06:16:55 字数 199 浏览 0 评论 0原文

  1. 我想知道什么是worker进程回收?
  2. 它在worker进程回收时到底做了什么?
  3. Worker进程驻留在应用程序池中并且可以配置
    通过应用程序池?
  4. 是应用程序池负责的吗
    回收工作进程?还是IIS负责回收呢?
  5. 回收worker进程时会发生什么?
  6. 不强制回收会有什么影响?
  1. I would like to know what is exactly worker process recycling?
  2. What exactly it does at the time of worker process recycling?
  3. Worker process resides in application pool and can be configured
    through application pool?
  4. Is that application pool is responsible
    to recycle worker process? or IIS is responsible to recycle it?
  5. What happens at the time recycling worker process?
  6. What are the impact of not forcing it to recycle?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

九公里浅绿 2024-11-12 06:16:55

IIS 工作进程回收是 IIS 杀死它生成的用于处理传入请求的子进程并启动它们的干净副本的过程。

当 IIS 第一次收到对给定应用程序池中的 Web 应用程序的请求时,它会生成一个工作进程来实际执行工作。此进程执行的操作包括维护 ASP.NET 代码、ISAPI 处理程序等中的会话状态和静态数据。随着时间的推移,IIS 想要的处理过程中可能会出现问题(应用程序代码中的内存泄漏、未处置的资源等)。无需关闭服务器即可进行清理。因此,它会定期告诉工作进程终止,并生成一个新的进程。

当回收期到来时,IIS 停止向垂死的进程发送新的服务请求,并允许其完成正常执行的任何操作。它将提前生成一个新的替换进程,并在旧进程完成时开始向该进程发送新请求。一旦旧进程没有什么可做的,它就会正常终止。

工作进程被隔离到给定的应用程序池,因为这就是 IIS 实现进程隔离的方式。 (例如,这就是为什么您可以在单个服务器上混合使用 .NET Framework 版本 - 每个应用程序池都有自己加载的框架库,与其他应用程序池分开。)应用程序池确定有关工作进程的其他信息,包括它们的凭据以及该进程在关闭之前停留的时间。

关闭回收确实没有充分的理由,但如果一切正常,那么应该不会造成任何损害。如果您在工作进程中运行行为不当的代码,就会出现问题;随着时间的推移,即使是微小的内存或资源泄漏也会累积起来,您必须关闭应用程序池来清理它们。通过重叠回收,IIS 可以在不中断服务的情况下为您处理这些问题。

IIS Worker Process Recycling is the process whereby IIS kills of the child processes that it spawns to handle incoming requests and starts clean copies of them.

The first time IIS gets a request for a web application in a given application pool, it spawns a worker process to actually do the work. This process does things like maintaining the session state and static data from your ASP.NET code, ISAPI handlers, etc. Over time, problems could arise in the processing (memory leaks in the application code, undisposed resources, etc.) that IIS wants to clean up without having to shut down the server. So it will periodically tell the worker process to die off, and spawn a new one.

When the recycle period comes around, IIS stops sending new service requests to the dying process and allows it to finish whatever it's doing normally. It will spawn a new, replacement process in advance and start sending new requests to that one while the old one finishes up. Once there's nothing left for the old process to do, it terminates normally.

Worker processes are isolated to a given application pool, because that's how IIS accomplishes process isolation. (This is why, for example, you can mix .NET Framework versions on a single server -- each app pool gets its own loaded Framework libraries separate from the others.) The app pool determines other things about the worker processes, including their credentials and how long the process stays around before being shut down.

There's really not a good reason to turn off recycling, but if everything is working properly it shouldn't hurt anything. The problems arise if you run code within the worker process that misbehaves; over time even tiny memory or resource leaks build up and you have to shut down application pool down to clean them up. With overlapped recycling, IIS takes care of that for you with no disruption in service.

把昨日还给我 2024-11-12 06:16:55

工作进程回收只是指重新启动asp .net工作进程(aspnet_wp.exe)。这是由于各种原因而完成的。下面的文章描述得相当恰当。
http://technet.microsoft.com/en-us/ Library/cc759005(WS.10).aspx

请仔细阅读。

Worker process recycling just means the restart of the asp .net worker process (aspnet_wp.exe) . It's done due to various reasons. The following article describes things quite decently.
http://technet.microsoft.com/en-us/library/cc759005(WS.10).aspx

Please go through it.

挽清梦 2024-11-12 06:16:55

场景各有不同,但请记住:如果您的 Web 应用程序对数据库信息进行初始内存缓存(假设是巨大的初始缓存),则对新生成的应用程序池的第一个请求将需要很长时间才能完成。

Scenarios vary, but just to keep in mind: If your web app does initial in-memory caching of db information (let's say huge initial caching), the first request to the newly spawned apppool will take long to complete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文