Weirdness with mongoengine ReferenceField
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2 Looping
--
Chapters
00:00 Weirdness With Mongoengine Referencefield
03:05 Accepted Answer Score 4
03:59 Thank you
--
Full question
https://stackoverflow.com/questions/8424...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #django #modwsgi #mongoengine
#avk47
ACCEPTED ANSWER
Score 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.