[Mono-list] apache terminating mod_mono?
Mike Glenn
mglenn at zoominternet.net
Fri Sep 1 14:01:18 EDT 2006
OK some digging and debugging turned up this:
If no apache MonoUnixSocket flag is defined in the config then the server tries
to load:
[Fri Sep 01 13:44:54 2006] [warn] Socket file name /tmp/mod_mono_server_global
Where as the man page for mod-mono-server says:
--filename file (mod-mono-server only)
The unix socket file name to listen on. Default value:
/tmp/mod_mono_server
and mod_mono.c has:
MAKE_CMD12 (MonoUnixSocket, filename,
"Named pipe file name. Mutually exclusive with MonoListenPort. "
"Default: /tmp/mod_mono_server"
)
I had added this line to the apache config because I was apache/mod_mono were
not communicating with mod-mono-server:
MonoUnixSocket default /tmp/mod_mono_server
this seems to have caused mod_mono.so to think there where two instances of
mod-mono-server/xsp running.
One that was set to MonoRunXSP False and one that was true. I added some
debugging lines to mod_mono.c and heres what I got in the terminate loop:
static apr_status_t
terminate_xsp2 (void *data, char *alias)
{
/* alias may be NULL to terminate all XSPs */
server_rec *server;
module_cfg *config;
apr_socket_t *sock;
apr_status_t rv;
char *termstr = "";
xsp_data *xsp;
int i;
DEBUG_PRINT (0, "Terminate XSP");
server = (server_rec *) data;
config = ap_get_module_config (server->module_config, &mono_module);
for (i = 0; i < config->nservers; i++) {
xsp = &config->servers [i];
DEBUG_PRINT (0, "XSP Setting: %s", xsp->run_xsp);
if (xsp->run_xsp && !strcasecmp (xsp->run_xsp, "false"))
continue;
...snip...
[Fri Sep 01 13:40:28 2006] [notice] caught SIGTERM, shutting down
[Fri Sep 01 13:40:28 2006] [warn] Terminate XSP
[Fri Sep 01 13:40:28 2006] [warn] XSP Setting: False
[Fri Sep 01 13:40:28 2006] [warn] XSP Setting: True
[Fri Sep 01 13:40:28 2006] [warn] Socket file name /tmp/mod_mono_server
[Fri Sep 01 13:40:28 2006] [warn] try_connect: 0
So in the end I changed mod-mono-server --filename /tmp/mod_mono_server_global
and now things are working again as expected. But it seems that the defaults are
not what the use to be or that the docs need updated.
Mike Glenn
> -----Original Message-----
> From: Mike Glenn [mailto:mglenn at zoominternet.net]
> Sent: Friday, September 01, 2006 12:00 PM
> To: 'Gonzalo Paniagua Javier'; mono-list at lists.ximian.com
> Subject: [Mono-list] apache terminating mod_mono?
>
> A little background:
>
> I run mod-mono-server with its own init script.
> I run apache with the MonoRunXSP False flag
>
> This allows me to start and stop apache and mod-mono-server
> independently of
> each other.
> I.E. when I take down mod-mono-server apache displays a
> custom error page
> informing the user that we are working on the site instead of
> a message from the
> browser that no such server exists. On the flip side I can
> make a change to the
> apache config and reload with out going through the restart
> time or session loss
> on the running mod-mono-server.
>
> I recently updated to mono, xsp and mod_mono to 1.1.17 from
> 1.1.13 and now when
> I stop apache it kills mod-mono-server. I've tested and the
> same thing occurs
> using both unix and tcp sockets.
>
> Can anyone advise me on this?
>
> Thanks for your time.
>
> Mike Glenn
>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
More information about the Mono-list
mailing list