[Mono-list] Trying to set up hosting on mono

Joshua Tauberer jit at occams.info
Wed Aug 8 11:02:13 EDT 2007


Maxim Karavaev wrote:
> We are trying to organize mass hosting for ASP.Net on Mono (apache + 
> mod_mono). We use FreeBSD with Apache 2.0 and latest Mono 1.2, 
> compiled from sources. And we've got some difficulties:

> 2. How we could restart one given web-site on the server. It seems 
> like Mono don't restart web-site after modifying of web.config file. 
> Now we have to restart whole apache.

I'm not sure what the conditions are for automatically restarting 
individual web applications, but you can restart mod-mono-server using 
the mod_mono control panel. See that section here:

http://mono-project.com/Mod_mono

I've written a command-line script (using links/elinks/lynx/whatever) to 
fetch the appropriate URL when I want to restart mod-mono-server.

 > 1. After several days of normal work, mod_mono unexpectedly become
 > unavailable. We even have to use "kill" command to kill all mono and
 > apache processes to restart it. May be it depends on amount of
 > simulatelously http connections, because it seems like mono didn't
 > use whole available free memory.

There are two possible work-arounds. One the one hand, you could set up 
a cron job to restart mod-mono-server (as above) automatically at least 
daily.

Also, Marek has recently committed to svn some changes to mod_mono to 
provide three new directives:
     MonoAutoRestartMode Requests (or Time)
     MonoAutoRestartRequests 1000
     MonoAutoRestartTime DD[:HH[:MM[:SS]]]
to automatically restart mod-mono-server after a certain number of 
requests or after a certain amount of time. Those changes don't actually 
work for me out of the box (patch pending), but it may work for you. 
(You'd also need to install the latest mod-mono-server (xsp) from svn too.)

-- 
- Josh Tauberer

http://razor.occams.info

"Yields falsehood when preceded by its quotation!  Yields
falsehood when preceded by its quotation!" Achilles to
Tortoise (in "Gödel, Escher, Bach" by Douglas Hofstadter)


More information about the Mono-list mailing list