2008/12/3 Graham Dumpleton <[EMAIL PROTECTED]>: > 2008/12/3 Justin Bronn <[EMAIL PROTECTED]>: >> >>> WSGIDaemonProcess apache user=apache group=apache processes=5 >>> threads=5 >> >> This could be part of your problem -- it should be `threads=1`. This >> is because GEOS is not a thread safe library, and the serialization to >> WKT code in particular uses static variables that can cause >> unpredictable behavior if multiple threads enter the code at the same >> time. Thus, you also made the right choice in choosing a prefork >> version of Apache (which Robert should also be using instead of the >> worker). > > Whether you use prefork or worker will not make any difference if you > are using mod_wsgi daemon mode and would only be relevant if using > mod_wsgi embedded mode. If the code isn't thread safe, making daemon > processes run with threads=1 would be important for mod_wsgi daemon > mode though. As mod_python only runs in an embedded mode, for it, use > of prefork would also be important.
FWIW, latest in: http://groups.google.com/group/django-users/browse_frm/thread/e337057e9df9bb9?hl=en suggests that nothing to do with threading as has been reproduced in 64 bit mode from ipython. Ie., outside of Apache. All very confusing. Graham >>> > I've been fighting a nearly identical bug to Robert for a while now >>> > too, in fact, but his greater gdb-fu has got him further. my problem >>> > description of the problem is nearly identical: >>> >>> w00t! well. not for you, But i'm glad to know i'm not the only one. >> >> I've been trying to figure this out as well, wish y'all had told me >> sooner! There's something fishy going on with Intrepid's version of >> Apache. I was able to get mod_wsgi to deploy on both 32 and 64-bit >> versions, but I experienced an exception (on 32-bit) and a segfault >> (on 64-bit) as a geometry is transformed when trying to view a record >> in the admin. I've created a ticket to document this behavior: >> >> http://code.djangoproject.com/ticket/9694 >> >> The patch fixes the exception on 32-bit, but does not fix the segfault >> on 64-bit. >> >> For 1.1, I'm doing a minor refactor of the GEOS interface (mostly to >> use the non-deprecated IO WKT|WKB reader APIs). I've created a >> mercurial repo: >> >> http://geodjango.org/hg/gis-geos/ >> >> In my current interface I do not explicitly specify the response type >> of character pointers as `c_char_p` this is because ctypes >> automatically converts `c_char_p` to Python string objects in the >> errcheck function, and thus the memory address is not available to be >> freed. My ctypes-fu has improved, and in the refactor I've created a >> simple subclass of `c_char_p` -- this prevents conversion to a Python >> string object and allows me to free the address, all while explicitly >> setting the expected type of the pointer to be returned. When I >> replaced with the geos interface refactor, the segfault no longer >> occurs on 64-bit (I've yet to do 32-bit as I'm in the midst of >> finals). You can check out this changeset for the relevant details: >> >> http://geodjango.org/hg/gis-geos/rev/77f86525906d >> >> Try replacing the geos lib of your django with the one from the repo >> and let me know if it also works for you. >> >> Best Regards, >> -Justin >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. 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 -~----------~----~----~----~------~----~------~--~---
