Hi dane I think what really fixed it were the lines I added to the directives
WSGIDaemonProcess wms user=www-data group=www-data processes=10 threads=1 And WSGIProcessgroup wms When I set the processes to 1, it worked. So I decided to try for 10, and it still worked I installed python-lxml using apt-get. How do I post a complete step by step guide on the trac wiki for those who may be going through what I went through. :D Thanks Jome From: Dane Springmeyer [mailto:[email protected]] Sent: Friday, August 21, 2009 5:29 PM To: Jome Akpoduado Subject: Re: [Mapnik-users] libxslt is causing my server to freeze up - Update So, you are saying that changing threads to 1 fixed it? If so can you PLEASE post back to the public list so the issue can be resolved? Dane On Aug 20, 2009, at 9:19 PM, Jome Akpoduado wrote: Hi Dane That may mean that this is a race condition, ie that the requests are being made and either the OGCServer or libxml are not threadsafe. In your WSGIDaemonProcess make sure you have threads=1 WSGIDaemonProcess wms user=jome group=jome processes=10 threads=1 For some reason, the above worked. However I reduced the processes to 2 Thanks man!!! From: Dane Springmeyer [mailto:[email protected]] Sent: Thursday, August 20, 2009 10:13 PM To: Jome Akpoduado Cc: [email protected] Subject: Re: [Mapnik-users] libxslt is causing my server to freeze up Hi Jome On Aug 20, 2009, at 12:58 PM, Jome Akpoduado wrote: Hi dane, I tried the python-lxml package and I get the same freeze up. Interesting. And you are sure you uninstalled the one previously installed via easy_install ? Also, how did you install libxml2? I assume that from apt would be the case and if so I have no other ideas on installation. In standalone, my WMS client can GetCapabilities fine and render my requests (even with lxml installed). Oh, interesting. That may mean that this is a race condition, ie that the requests are being made and either the OGCServer or libxml are not threadsafe. In your WSGIDaemonProcess make sure you have threads=1 WSGIDaemonProcess wms user=jome group=jome processes=10 threads=1 You could also try reducing processes to 1, see if that makes any difference. I remove lxml and server works well (You can pass a getMap request and it responds okay). I reinstall and the same freeze. This leads me to believe, this might a bug from somewhere? Right? Ya, seems like it could be a bug in lxml, or perhaps mis-usage of lxml in the OGCServer. By the way, what other WMS solutions do you use now with Mapnik as base that bypasses the problem? Don't know of any... Thanks Jome P.S IS there a way I can get the standalone process to run even when I close my console (I'm using a virtual server which I access remotely. When I logout the process ends.) Yes. You can install 'screen' Do: $ sudo apt-get installs screen $ screen ... run your WSGI standalone ... close the terminal (don't type exit) To get back to it ssh back in, then type: $ screen -r ... you should be back in the console with the running server process From: Dane Springmeyer [mailto:[email protected]] Sent: Thursday, August 20, 2009 8:42 PM To: Jome Akpoduado Cc: [email protected] Subject: Re: [Mapnik-users] libxslt is causing my server to freeze up On Aug 20, 2009, at 11:08 AM, Jome Akpoduado wrote: Hello all. I was silent about this for a while as I felt I was becoming much of a bother. But this is what I have observed with my server. I'm using Ubuntu 8.10 Intrepid. I installed mapnik and configured (much with Dane's help) and my first problem (well. not really the first) was that I could get the server to run (not standalone) but my WMS client could not get capabilities which is possible standalone. Oh? the capabilities did not work when run in WSGI Standalone mode? Are you sure? I think I may have missed this problem in your previous emails... Perhaps it was because the WSGI standalone was mounting at port 8000 or 8080, not port 80. It is possible to mount on port 80 if you stop apache and then have the standalone server attach to 0.0.0.0:80. I felt it had to do with some xml parsing problem. Hmm, possibly the built in xml libraries (used if lxml is not present) do not support namespacing correctly. Shoot, I didn't realize this issue previously. Overall however, it seems like nicemap should still be able to read the response... After some research I realized I needed some dependencies, particularly lxml and libxslt. I go ahead and install them and everything remains fine in standalone. However when I run the service from apache, the whole thing freezes. Yes I have seen this with lxml/libxslt... On osx I have never been able to get lxml python bindings working with an long-running server process (I may not have been able to get it work in standard cgi either- can't recall). I experienced crashing, and that was one of the motivations for allow for fallback support in the OGCServer, such that if lxml is not installed it will use the built-in xml python libraries: http://trac.mapnik.org/changeset/1085/trunk/bindings/python/mapnik/ogcserver /common.py Okay, I rebuilt the server you mean mapnik? the server is just python code and is not built at all, just copied to your site-packages directory.... and configured without lxml and libxslt and the service runs within apache. I install those two dependencies and they have seemingly frozen apache again. It will only work standalone. I installed lxml using easy_install. That's when the server worked last! You could try installing it with apt-get. Any ideas what could be wrong here? Sounds like: 1) not using lxml messed up the servers namespacing in the GetCaps response 2) lxml used within apache can result in crashing for unknown reasons 3) the standalone wsgi server may or may not introduce other variables into this mix Dane
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

