[Mono-aspnet-list] Stopping fastcgi-mono-server gracefully and website content updating with no need of restarting it

Robert Jordan robertj at gmx.net
Sat Nov 12 07:47:35 EST 2011


On 12.11.2011 06:05, Marcelo Zabani wrote:
>     1. Can I update the contents of my website (dll's, for instance) without
>     having to restart the fastcgi process? Is there a possibility of
>     momentaneous failure for my visitors when I'm doing that?

The web app should restart (by recycling the appdomain) whenever
it detects that one of its dependencies has changed.

>     2. How can I gracefully stop fastcgi-mono-server? I took the
>     initialization script from
>     http://yojimbo87.github.com/2010/03/14/mono-startup-script.html as
>     basis, but it just kills (sends SIGTERM) the fastcgi-mono-server process,
>     not calling Application_End in Global.asax (and that is what I mean by
>     ungraceful shutdown). SIGHUP won't work either (though it also kills the
>     server)

Currently, there is no way to shutdown a fastcgi-mono-server
process gracefully.

> Also, I can't find a page to follow the news or the state of
> fastcgi-mono-server, the only references I have taught me how to set up the
> server and the basic workings of it, but I have NO IDEA where to look for
> new versions and changelogs (or even a download page, so far I've been
> using portage to install the xsp package, which comes with
> fastcgi-mono-server). I found http://kerrick.wordpress.com/2007/08/ but the
> last post on fastcgi-mono-server is so old that it scares me.

fastcgi-mono-server is basically unmaintained. It has received
some patches during the last years, but these documentations
and articles still apply.

> If I may ask one last question, how can I run fastcgi-mono-server as an
> unprivileged user? I'm afraid to try to setuid the process, since I'm not

Well, simply don't run it as root.

> quite sure if mono will respect the setuid flag (haven't tried it yet) and

It will not. fastcgi-mono-server is just a script that won't pay
attention to setuid.

Robert



More information about the Mono-aspnet-list mailing list