Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appdomain recycle settings on 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.

like image 463
Radu094 Avatar asked Apr 30 '10 15:04

Radu094


1 Answers

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.

like image 180
kervin Avatar answered Sep 20 '22 09:09

kervin