Re: Σχετ: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Thu Sep 22 07:17:04 PDT 2011
Hi,
Oracle is known to be slow in aggrecated extents query but this is something different because the process stops already after the SELECT postgis_version()query and SELECT ST_Extent is not sent at all.
My PostgreSQL version is 8.3 and the query that Mapserver is sending "select postgis_version()" returns
1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
-Jukka Rahkonen-
> -----Alkuperäinen viesti-----
> Lähettäjä: Smith, Michael ERDC-CRREL-NH
> [mailto:Michael.Smith at usace.army.mil]
> Lähetetty: 22. syyskuuta 2011 17:07
> Vastaanottaja: Rahkonen Jukka; 'thomas bonfort';
> 'mapserver-users at lists.osgeo.org'
> Aihe: Re: Σχετ: [mapserver-users] Re: Mapserver 6 WMS /
> PostGIS Problem
>
> 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.Rahkonen at 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.bonfort at gmail.com]
> >> Lähetetty: 22. syyskuuta 2011 16:47
> >> Vastaanottaja: Rahkonen Jukka
> >> Kopio: Andreas Douvalis; mapserver-users at 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.Rahkonen at 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:anddreas2 at 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.Rahkonen at mmmtike.fi>
> >> > ????: 'anddreas2' <anddreas2 at yahoo.gr>;
> >> "'mapserver-users at lists.osgeo.org'"
> >> > <mapserver-users at 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-bounces at lists.osgeo.org
> >> >> [mailto:mapserver-users-bounces at lists.osgeo.org]
> Puolesta anddreas2
> >> >> Lähetetty: 22. syyskuuta 2011 8:52
> >> >> Vastaanottaja: mapserver-users at 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 at lists.osgeo.org
> >> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > mapserver-users mailing list
> >> > mapserver-users at lists.osgeo.org
> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >
> >> >
> >> _______________________________________________
> >mapserver-users mailing list
> >mapserver-users at lists.osgeo.org
> >http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
More information about the MapServer-users
mailing list