On Oct 4, 2010, at 11:55 PM, Daniel Behr wrote:

> Hi Dane,
> 
> Am 02.10.2010 00:12, schrieb Dane Springmeyer:
>> Okay, I think I found it.
>> 
>> Putting this in your WSGI config should fix it:
>> 
>> WSGIApplicationGroup %{GLOBAL}
> 
> GROUP and GLOBAL dont work. both freeze :(

Okay. Well, I've been able to replicate a hang on a RHEL server and adding that 
line fixes things perfectly.

However, I've now gone back, removed that line, prompted the hang, and have 
tracked down the line number that prompts it:

http://trac.mapnik.org/browser/trunk/bindings/python/mapnik/ogcserver/WMS.py#L52

That is the call to mapnik.load_map(), which is different than I've seen 
previously but still involves libxml2 (the C library which is wrapped by lxml)

So, we are likely dealing with more than one way that libxml2/lxml can hang 
apache. Ugh.

> 
>> More details here:
>> 
>> https://techknowhow.library.emory.edu/blogs/branker/2010/07/30/django-lxml-wsgi-and-python-sub-interpreter-magic
> 
> very interesting...
> 
> does Cython have to be installed? lxml installation instructions are a bit 
> ambiguous in that case.
> 

No idea.

> Using lxml trunk (lxml-2.3beta1) the browser freezes. Without lxml or with 
> one of the older lxml versions installed the browser throws an exception as 
> if I would expect

yep. in all cases removing lxml from the mix fixes things for me.

> from a WMS request including this parameter:
> 
> EXCEPTIONS=application/vnd.ogc.se_inimage
> 
> if not set it should default to 'xml'. no matter if I set it to xml, inimage 
> or blank, or dont set it at all, it defaults to inimage.

That sounds like a minor issue in the ogcserver, likely around CASE. I think 
the WMS standard says it should be XML, but of course the exception response 
differs depending on version.

> 
>> So, this should allow the ogcserver to play nicely within mod_wsgi with
>> lxml installed. If this fixes the hang for you then we can investigate
>> more. If not, then make sure you are only running one instance of the
>> ogcserver within Apache.
> 
> only apaches mod_wsgi loads the wsgi script which calls the ogcserver. wsgi 
> standalone, mod_python are off. So its running only once, right?
> 

Well, likely yes. Can you try putting all your WSGI* config stuff in a 
virtualhost to make sure?

> thanks
> Daniel
> 
>> Dane
>> 
>> 
>> On Oct 1, 2010, at 10:59 AM, [email protected]
>> <mailto:[email protected]> wrote:
>> 
>>> Hi, I forgot something...
>>> when uninstalling lxml, mod_wsgi can actually connect to mapniks
>>> ogcserver (ogcserver welcome appears). as Dane said earlier in this
>>> thread, mapnik falls back to standard xml support. at least this
>>> machine should... but with a GetMap request the browser still returns
>>> no map, the text of the requested URL gets rendered as an unformatted
>>> image instead.
>>> 
>>> Daniel
>>> 
>>> 
>>> Am 30.09.2010 18:14, schrieb Dane Springmeyer:
>>> >
>>> > On Sep 1, 2010, at 3:57 AM,<[email protected]
>>> <mailto:[email protected]>> <[email protected]
>>> <mailto:[email protected]>> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> Just tried and I can reproduce the same problem here. Ubuntu server
>>> 9.10, Mapnik 0.7.1, mod_python will get stuck in Mapnik's load_map in
>>> WMS.py.
>>> >>
>>> >> Strange enough, I'm using the *same* code under wsgi with no problems.
>>> >>
>>> >
>>> > Daniel look ^^^. So Manel, what Apache version, prefork or worker,
>>> and what mod_wsgi and python versions?
>>> >
>>> > Btw, I forgot to mention the ticket we once had that tracked this
>>> issue (at lease specific to GetCaps):
>>> >
>>> > http://trac.mapnik.org/ticket/464
>>> >
>>> > It would be good to add any additional info we find to that ticket
>>> thread. For instance, short of understanding the exact problem within
>>> lxml, hopefully we can recommend a certain version of
>>> python/apache/mod_wsgi which will work around the problem.
>>> >
>>> > - Dane
>>> 

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to