Hello folks, I am facing following issue and was wondering whether anybody could have a suggestion. I am running mod_wsgi /python 2.7.3 on a ubuntu 12.04 box.
My web application is django based but is is using just one view. The issue i have is following. I have a class A. This class uses a metaclass that inserts the instance in a object oriented database (dybase). The database file is opened by the metaclass and closed when the interpreter exits (when i close bpython) using atexit hook. The issue is that apache runs this view from multiple processes. SO if i query the index for the nr of object each process reports a different number. The database has exclusive locks but i did not manage to use them correctly. My point is i do not know exactly what is the best way to: open/close the database when to lock the index so i get correct results. FYI if i use the daemon with 1 process everything works fine. I hope i wasn't very cryptic. Regards -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/kjxgc2C1oywJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
