Multiple flask projects not running using mod_wsgi

6 views
Skip to first unread message

Pooja Shastri

unread,
May 11, 2024, 8:14:06 AMMay 11
to modwsgi
We have windows apache server , and we want to host parallelly 3 python-flask projects using differrent ports and same server name.
Project 1 uses numpy and lxml which needs WSGIApplicationGroup %{GLOBAL} for c extensions.
Project 2 and 3 does not need %{GLOBAL}%

The issue is in httpd.conf file of apache if we write WSGIApplicationGroup %{GLOBAL}, then Project 1 will run for sure but from Project 2 and Project 3 only one project runs which is executed first.
And the error defined is: import error: interpreter changes detected - this module can be loaded into one interpreter per process

If we remove WSGIApplicationGroup %{GLOBAL}, then Project 1 will stop as it will not execute numpy and lxml, but Project 2 and Project 3 will run.

Please help with this.

Graham Dumpleton

unread,
May 11, 2024, 8:45:35 AMMay 11
to mod...@googlegroups.com
As per the message it seems you are using a Python module that is not designed to be used in multiple sub interpreters of the same process and even has an explicit check to stop you from trying. Not really much you can do about it as Apache on Windows doesn’t support multi process.

Hat is the module you are using that generates the error?

On 11 May 2024, at 10:14 PM, Pooja Shastri <poojash...@gmail.com> wrote:

We have windows apache server , and we want to host parallelly 3 python-flask projects using differrent ports and same server name.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/a273ee84-b304-45c4-9530-b6602c38b262n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages