Open parmentelat opened 1 week ago
Try changing to use:
WSGIScriptAlias /PLCAPI /usr/share/plc_api/apache/plc.wsgi
WSGIDaemonProcess plcapi-wsgi-ssl user=apache group=apache processes=1 threads=25
WSGIProcessGroup plcapi-wsgi-ssl
WSGIApplicationGroup %{GLOBAL}
In other words, add within the VirtualHost
definition:
WSGIApplicationGroup %{GLOBAL}
I don't know why but some versions of psycopg2
in the past haven't worked properly when used in a Python sub interpreter.
That extra directive will force the Python WSGI application to run in the main interpreter context of the mod_wsgi daemon process instead of a sub interpreter context.
That did the trick indeed ! thanks a million :)
for the record the app was working just fine in fedora 39, and I ran into this when upgrading to fedora41
here are a few possibly relevant changes:
this issue resonates with #753 however I have not been able to solve my problem from that issue, so here is a new one
in my case I have a plain fedora41 box freshly installed, trying to run an application that was working fine within fedora40, but that fails in this new environment
I have python3 and python3-psycopg2 installed through dnf from fedora and as far as the terminal, this works fine, in that I can do
however when invoked through wsgi I am getting the error quoted in the title, and more specifically
the apache config reads
the puzzling thing is that again this was working fine within fedora40 - which was using python-3.12 instead of 3.13 here, but well that does not seem too relevant..
there is no virtualenv in this box, just one plain system python install
let me know if I can make anything clearer