Opened 5 years ago
Closed 4 years ago
#262 closed defect (fixed)
pycsw mod_wsgi vs CGI
Reported by: | TC Haddad | Owned by: | Jeff McKenna |
---|---|---|---|
Priority: | critical | Milestone: | 4.0.5 release |
Component: | MS4W - Packages | Version: | 4.0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The pycsw section of the ms4w readme state that pycsw uses mod_wsgi, and the readme section for confirming mod-wsgi is very thorough for confirming if mod_wsgi is actually loaded and working.
However the httpd.conf file contains 2 sections for running pycsw:
- run pycsw through mod_wsgi (around line 626)
- run pycsw through CGI (around line 634)
As installed by the installer, the block for "run pycsw as CGI" is uncommented, while the block for "run pycsw through mod_wsgi" is commented out.
Neither the pycsw or the mod_wsgi section of the ms4w docs mention the need to uncomment the "run pycsw through mod_wsgi" block, although presumably this is necessary?
Just thought this could be clarified for new users.
Change History (8)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Summary: | pycsw configuration vs documentation → pycsw mod_wsgi vs CGI |
---|
comment:3 by , 4 years ago
Milestone: | 4.0.4 release → 4.0.5 release |
---|
comment:5 by , 4 years ago
Priority: | minor → critical |
---|
comment:6 by , 4 years ago
Component: | MS4W - Base → MS4W - Packages |
---|
comment:7 by , 4 years ago
!!! I've been working hard on this bug, for the MS4W 4.0.5 release with pycsw 2.6.0 & mod_wsgi, with Apache hanging and not giving any debug messages...
It can be solved with one line in httpd.conf (!!) with a specific WSGIApplicationGroup setting :
# run pycsw through mod_wsgi WSGIApplicationGroup %{GLOBAL} WSGIScriptAlias /pycsw /ms4w/apps/pycsw-2.6.0/pycsw/wsgi.py SetEnvIf Request_URI "/pycsw$" PYCSW_CONFIG=/ms4w/apps/pycsw-2.6.0/default.cfg <Directory /ms4w/apps/pycsw-2.6.0/pycsw> Order deny,allow Allow from all </Directory>
This forces the WSGI application to run in Python's main interpreter, to avoid third party Python packages causing 'thread deadlock' or crashes.
comment:8 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is fixed for MS4W 4.0.5 release today. (new pycsw 2.6.0 is through Apache mod_wsgi by default again)
You noticed :)
Actually this is because the initial MS4W version that included pycsw was configured (and working) with mod_wsgi - but when I upgraded to the pycsw 2.4.2 release the GetCapabilities would hang, when configured for mod_wsgi, so I changed it to CGI when releasing MS4W.
I updated the pycsw section in the readme to mention that CGI is configured by default.
More testing needs to be done with the Apache hang with 2.4.2, and reported to the pycsw community.