I have seen similar issues for Oracle, where it queries all geometries and aggregates the bounds to get an extent. Manually setting the wms_extents is what we always do.
Mike -- Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 9/22/11 9:57 AM, "Rahkonen Jukka" <jukka.rahko...@mmmtike.fi> wrote: >Hi, > >I turned PostgreSQL statement logging on and I can see this line to >appear: >execute (unnamed): SELECT postgis_version() > >Mapserv.exe is eating now 52% of CPU and nothing else seems to happen. > >-Jukka- > > >> -----Alkuperäinen viesti----- >> Lähettäjä: thomas bonfort [mailto:thomas.bonf...@gmail.com] >> Lähetetty: 22. syyskuuta 2011 16:47 >> Vastaanottaja: Rahkonen Jukka >> Kopio: Andreas Douvalis; mapserver-users@lists.osgeo.org >> Aihe: Re: ????: [mapserver-users] Re: Mapserver 6 WMS / >> PostGIS Problem >> >> When the request hangs, is it the mapserver process or the postgres >> one that is eating all the cpu cycles ? >> >> -- >> thomas >> >> 2011/9/22 Rahkonen Jukka <jukka.rahko...@mmmtike.fi>: >> > Hi, >> > >> > I can repeat this problem with Mapserver 6.0.1 on Windows >> Vista 32-bit. I >> > defined one PostGIS test layer without metadata and >> GetCapabilities fails >> > after a long waiting. With DEBUG 5 the last line in >> MS_ERRORFILE that >> > appears is this >> > msPostGISLayerIsOpen called. >> > >> > Adding "wms_extent" corrects the situation. Same mapfile >> does work on Linux >> > and it used to work for me on Windows too with Mapserver 5.x. >> > >> > -Jukka Rahkonen- >> > >> > ________________________________ >> > Lähettäjä: Andreas Douvalis [mailto:anddre...@yahoo.gr] >> > Lähetetty: 22. syyskuuta 2011 10:14 >> > Vastaanottaja: Rahkonen Jukka >> > Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> > >> > No problem with pgsql >> > <!--[if !supportLineBreakNewLine]--> >> > <!--[endif]--> >> > It takes 78 ms the sql of the layer that it doesn't work >> with wms get map >> > request. >> > Unfortunately there is no debug error to check the query >> that mapserver >> > runs. >> > ________________________________ >> > ???: Rahkonen Jukka <jukka.rahko...@mmmtike.fi> >> > ????: 'anddreas2' <anddre...@yahoo.gr>; >> "'mapserver-users@lists.osgeo.org'" >> > <mapserver-users@lists.osgeo.org> >> > ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 >> > ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> > >> > Hi, >> > >> > Basically it means that the SQL query for getting the >> extents of your layer >> > is slow. >> > Set timing on with \timing on in your psql window and run query >> > select st_extent(geom) from titles; >> > http://postgis.refractions.net/docs/ST_Extent.html >> > How long does it take? Do vacuum analyze for the table and >> try again to see >> > if there has been some trouble with indexes. >> > Anyway, it is always faster to get extents from the >> metadata line than from >> > PostGIS, but normally it should not take very long. For me >> it takes 1500 ms >> > with a table of 300000 polygons. >> > >> > -Jukka Rahkonen- >> > >> > >> > >> >> -----Alkuperäinen viesti----- >> >> Lähettäjä: mapserver-users-boun...@lists.osgeo.org >> >> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta anddreas2 >> >> Lähetetty: 22. syyskuuta 2011 8:52 >> >> Vastaanottaja: mapserver-users@lists.osgeo.org >> >> Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> >> >> >> I found the solution: >> >> >> >> Just set THE wms_extent METADATA in the layer section and it >> >> works. Without >> >> Layers wms_extent it crashes. >> >> >> >> (Jesus, I spent three days of my life for this stupid thing. >> >> I tested with >> >> all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). >> >> I am think it >> >> is ms4w problem). >> >> >> >> -- >> >> View this message in context: >> >> http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS >> >> -Problem-tp6387007p6819004.html >> >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> >> _______________________________________________ >> >> mapserver-users mailing list >> >> mapserver-users@lists.osgeo.org >> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> > >> > >> > _______________________________________________ >> > mapserver-users mailing list >> > mapserver-users@lists.osgeo.org >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > >> > >> _______________________________________________ >mapserver-users mailing list >mapserver-users@lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users