ramkrishanbhatt / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Apache 2.3 has changed mechanisms for defining the accept mutex for cross process locks. #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The variable ap_accept_lock_mech has gone in Apache 2.3 replaced with some 
registration 
mechanism. The mod_wsgi code was relying on that variable to know what locking 
mechanism to 
use as a default for its own daemon process cross process mutex locks for 
listener socket.

It isn't known if default can now be determined. If can't could still fallback 
to APR default and 
require that WSGIAcceptMutex directive be used in parallel to normal 
AcceptMutex directive (or 
equivalent) if need to change both.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 4 Mar 2010 at 11:32

GoogleCodeExporter commented 8 years ago
Following patch is sufficient to get it compiling for now.

Index: mod_wsgi.c
===================================================================
--- mod_wsgi.c  (revision 1535)
+++ mod_wsgi.c  (working copy)
@@ -9655,7 +9655,11 @@

     sconfig = ap_get_module_config(cmd->server->module_config, &wsgi_module);

+#if !defined(AP_ACCEPT_MUTEX_TYPE)
     sconfig->lock_mechanism = ap_accept_lock_mech;
+#else
+    sconfig->lock_mechanism = APR_LOCK_DEFAULT;
+#endif

     if (!strcasecmp(arg, "default")) {
         sconfig->lock_mechanism = APR_LOCK_DEFAULT;

Just means cant rely on AcceptMutex as a default if overridden and need to 
separately specify WSGIAcceptMutex.

Changes applied in revision 1536 of trunk for mod_wsgi 4.0 and in revision 1537 
in branch for mod_wsgi 3.2.

Original comment by Graham.Dumpleton@gmail.com on 9 Mar 2010 at 8:01

GoogleCodeExporter commented 8 years ago
Version 3.2 of mod_wsgi released with this fix.

Original comment by Graham.Dumpleton@gmail.com on 9 Mar 2010 at 10:13