mod_mono 上的 Appdomain 回收设置阿帕奇

发布于 2024-08-31 02:04:08 字数 226 浏览 6 评论 0原文

如何控制在 mod_mono 和 mod_mono 上运行的 ASP.NET 应用程序的应用程序回收设置?阿帕奇?

在 IIS6 和7 有一个选项可以指定 AppDomain 被回收的时间段、请求数量等,并且应用程序基本上会执行 Application_End() / Application_Start()。

我在 mod_mono & 上看到了相同的行为Apache,但我找不到在哪里更改设置。

How does one control the application recycle settings for an ASP.NET application runnin on mod_mono & Apache ?

On IIS6 & 7 there was an option to specify either a time period, a number of requests, etc. when the AppDomain would be recycled and the application would basically do an Application_End() / Application_Start().

I am seeing the same behaviour on mod_mono & Apache ,but I can't find where to change the settings.

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

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

发布评论

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

评论(2

绝對不後悔。 2024-09-07 02:04:08

在这里,来自 http://www.mono-project.com/Mod_mono# Automatic_restart_of_the_mod-mono-server_backend

SO 格式有点不对,但基本上你可以使用此配置按时间或请求重新启动 mod-mono-server 进程(在 apache 下运行)。

自动重启
mod-mono-服务器后端

mod_mono可以自动重启
Mono (mod-mono-server) 后端即
在一定时间后处理请求
时间量。如果您这样做,这很有用
发现mono进程正在增长
随着时间的推移无限期地,或者如果你只是
需要确保你打扫房子
每隔一段时间。

有两种自动重启方式
方法:一种基于时间,一种
基于请求数量
服务。您可以将它们激活为
如下:

三小时后自动重启。
1 单声道自动重启模式时间
2 Mono自动重启时间00:03

上面的时间格式是
DD[:HH[:MM[:SS]]]。

服务 10,000 个请求后自动重新启动。
1 MonoAutoRestartMode 请求
2 MonoAutoRestartRequests 10000

与大多数其他 mod_mono 一样
指令,第一个参数
指令可以是名称或别名
mod-mono-服务器。这总是
可选,并且在
上面的例子。

Here it is, from http://www.mono-project.com/Mod_mono#Automatic_restart_of_the_mod-mono-server_backend

SO formatting is a little off, but basically you can restart mod-mono-server process ( running under apache ) by time or requests using this configuration.

Automatic restart of the
mod-mono-server backend

mod_mono can automatically restart the
Mono (mod-mono-server) backend that is
handling requests after a certain
amount of time. This is useful if you
find that the mono process is growing
indefinitely over time, or if you just
need to make sure you clean house
every so often.

There are two automatic restart
methods: one based on time, and one
based on the number of requests
served. You can active them as
follows:

Auto-restart after three hours.
1 MonoAutoRestartMode Time
2 MonoAutoRestartTime 00:03

The time format above is
DD[:HH[:MM[:SS]]].

Auto-restart after 10,000 requests served.
1 MonoAutoRestartMode Requests
2 MonoAutoRestartRequests 10000

As with most other mod_mono
directives, the first parameter to a
directive can be the name or alias of
a mod-mono-server. This is always
optional and is omitted in the
examples above.

撩人痒 2024-09-07 02:04:08

从这个解释 Fast CGI 模块的链接来看,我猜需要有一个由 cron 作业定期运行的脚本来终止进程并重新启动它...我不知道这对您是否有任何帮助。你没有说明什么操作系统,我假设这是在 Win 平台上?如果您使用的是 Windows 平台,那么很容易安排一个脚本来重新启动 Mod_Mono 扩展,从而实现“回收”...

Judging by this link that explains the Fast CGI module, I would guess there would need to be a script that is run periodically by the cron job to kill the process and restart it... I do not know if this would be of any help to you. You did not state what OS, I am making an assumption that this is on a Win Platform? If you are on a Windows platform, then it would be easy enough to schedule a script to restart the Mod_Mono extension in effect "recycling"...

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