[Django]-Weirdness with mongoengine ReferenceField

4πŸ‘

βœ…

Are you using embedded mode or daemon mode of mod_wsgi? If using daemon mode of mod_wsgi are you delegating each site to a different daemon process group and then in turn forcing the application to run in main Python interpreter?

It may be the case that mongodb Python client module may not work properly in Python sub interpreters, especially when the module is used at the same time in a different sub interpreter of the same process.

So, you may have to run each site in separate daemon process group using WSGIDaemonProcess/WSGIProcessGroup and then force the user of the Python main interpreter using WSGIApplicationGroup with argument of β€˜%{GLOBAL}’.

Note that when forcing use of main interpreter for both sites, you can no longer use embedded mode, or have them both run in same daemon process group. Thus why you need to force each to run in separate daemon process group.

Leave a comment