[Mono-aspnet-list] AutoHosting and Apache restart

Max Rubis maxr at expeditions.com
Wed Apr 14 17:18:51 EDT 2010


Hi.

After whole day of debugging the xsp (mod-mono-server2.exe), I found why it's not restarting the thread properly (although root cause of this is still unknown).

ApplicationServer.cs:
There is a functon RealStop that does the cleanup. It's being called from a foreground thread here:

// A foreground thread is required to end cleanly
Thread stopThread = new Thread (new ThreadStart (RealStop));
stopThread.Start ();

For some reason, if I don't use "separate" thread, but just call the function everything works fine. So I just change that to:

RealStop();

Thanks,
Max

> -----Original Message-----
> From: mono-aspnet-list-bounces at lists.ximian.com [mailto:mono-aspnet-
> list-bounces at lists.ximian.com] On Behalf Of Max Rubis
> Sent: Tuesday, April 13, 2010 11:08 AM
> To: mono-aspnet-list at lists.ximian.com
> Subject: Re: [Mono-aspnet-list] AutoHosting and Apache restart
> 
> Also, I just noticed, that when I use Mono control panel to restart a
> particular backend, it always leaves a stranded process (with
> AutoHosting enabled, I've never seen this problem).
> 
> Thanks,
> Max
> 
> > -----Original Message-----
> > From: mono-aspnet-list-bounces at lists.ximian.com [mailto:mono-aspnet-
> > list-bounces at lists.ximian.com] On Behalf Of Max Rubis
> > Sent: Tuesday, April 13, 2010 10:47 AM
> > To: Gonzalo Paniagua Javier; mono-aspnet-list at lists.ximian.com
> > Subject: Re: [Mono-aspnet-list] AutoHosting and Apache restart
> >
> > Hi.
> >
> > > On Mon, 2010-04-12 at 16:54 -0400, Max Rubis wrote:
> > > [...]
> > > > Everything is working except couple annoyances:
> > > >
> > > > 1)     When I restart (or reload) Apache, mod_mono do NOT restart
> > xsp
> > > > servers. After completion of the restart, mod_mono just spawns
> > > another
> > > > set of xsp servers: after restart I have 10 xsp processes;
> another
> > > > restart – 15 total, and so on.
> > >
> > > What I do is stop/check that there are no stranded mod-mono-server
> > > processes/start. 'reload' also usually works. I'm not sure on what
> it
> > > depends though.
> >
> > The thing is that there are always stranded processes after Apache
> > restart (reload doesn't help).
> > If I enabled AutoHosting, then "master" process is restarted
> correctly,
> > but "application" processes become stranded all the time.
> >
> > Max
> > _______________________________________________
> > Mono-aspnet-list mailing list
> > Mono-aspnet-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


More information about the Mono-aspnet-list mailing list