Interpreter change detected - this module can only be loaded into one interpreter per process

Hi, I am running to virtual hosts on Apache2 server. Those two virtual hosts run the same Python code the only difference is the domain name (and SSL certs). Two domains pointing to the same application. I am using flask with wsgi_mod 4.5.17 python 3.6.9 when I use lxml 4.2.5 there is no problem but when I use lxml 4.3.4 (or 4.5.1) I am getting following error in Apache log file when accessing the second host: [Sat May 30 15:54:38.456844 2020] [wsgi:error] [pid 26355:tid 140326337488640] [client xxx.xxx.xxx.xxx:50435] import lxml.etree as et, referer: https://first_host [Sat May 30 15:54:38.456882 2020] [wsgi:error] [pid 26355:tid 140326337488640] [client xxx.xxx.xxx.xxx:50435] ImportError: Interpreter change detected - this module can only be loaded into one interpreter per process., referer: https://first host I use following wsgi_mod config (I tried with processes=1 but no difference) WSGIDaemonProcess abc3 threads=10 display-name=abc3 -- jacek

Hi! On Mon, Jun 01, 2020 at 02:16:17PM -0700, Jacek Pawlowski wrote:
You may need to add a WSGIApplicationGroup %{GLOBAL} to your Apache configuration, and/or make sure the two websites are using different WSGI daemon processes. Further reading: - https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.htm... - https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.htm... - https://bugs.launchpad.net/lxml/+bug/1713707 HTH, Marius Gedminas -- Lisp is still #1 for key algorithmic techniques such as recursion and condescension. -- Verity Stob

Hi, Thanks for the suggestions. Pls note that the setup works with lxml 4.2.4. but not 4.3.4 (there is no change to wsgi only version change of lxml) from the changelog I see that 4.3 was complied with Cython - can this be a problem? -- jacek On 2020-06-01 11:33 p.m., Marius Gedminas wrote:

Hi! On Mon, Jun 01, 2020 at 02:16:17PM -0700, Jacek Pawlowski wrote:
You may need to add a WSGIApplicationGroup %{GLOBAL} to your Apache configuration, and/or make sure the two websites are using different WSGI daemon processes. Further reading: - https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.htm... - https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.htm... - https://bugs.launchpad.net/lxml/+bug/1713707 HTH, Marius Gedminas -- Lisp is still #1 for key algorithmic techniques such as recursion and condescension. -- Verity Stob

Hi, Thanks for the suggestions. Pls note that the setup works with lxml 4.2.4. but not 4.3.4 (there is no change to wsgi only version change of lxml) from the changelog I see that 4.3 was complied with Cython - can this be a problem? -- jacek On 2020-06-01 11:33 p.m., Marius Gedminas wrote:
participants (2)
-
Jacek Pawlowski
-
Marius Gedminas