[postgis-users] Memory Bug in PostGIS Query
Torsten Mohr
tmohr at s.netic.de
Tue Oct 25 18:09:44 PDT 2011
Hello,
i also got an "out of memory" error using PostGis (through Mapnik).
I get the error when creating a 6000 x 8000 map of Germany
with a script that worked with previous versions of PostGIS / planet_osm_*:
Traceback (most recent call last):
File "./generate_image.py", line 91, in <module>
render(m, im)
RuntimeError: PSQL error:
out of memory for query result
Full sql was: 'SELECT AsBinary("way") AS
geom,"amenity","landuse","leisure","military","name","natural","power","tourism"
from (select * from planet_osm_polygon order by z_order,way_area desc) as
leisure WHERE "way" && SetSRID('BOX3D(503843.2677405493
5749599.546361594,1833866.038918196 7522963.241265123)'::box3d, 900913)'
Could this problem be related to the problem of the original poster?
I don't understand how a bad geometry record could get into the database.
I imported planet_osm_110928.tar.bz2, could it be related to that version?
Would it be likely that a new import of another planet_osm_* fixes the
problem? I would like to get around that, the last import took 11 days.
If not, how could i search the bad record in my database?
Best regards,
Torsten.
Am Sonntag, 23. Oktober 2011, 21:35:04 schrieb maplabs at light42.com:
> Hi -
>
> a couple of things.. it is the library GEOS that is crashing, ( part of
> PostGIS )
>
> Is your geometry clean? consistant ? what is the assurance level on that?
>
> --
>
> Next is that you have a huge, powerful computer but you are using only a
> fraction of the RAM Try reducing the Max Connections (if you are the
> primary user) to 60 from 100 then this (for example)
>
> # - Memory -
> shared_buffers = 2000MB # min 128kB
> # (change requires restart)
> temp_buffers = 64MB # min 800kB
>
> work_mem = 256MB # min 64kB
> maintenance_work_mem = 256MB # min 1MB
> --
>
> Next, upgrade your PostGIS and GEOS !!
> PostGIS 1.5.x and GEOS 3.3 I believe are current
>
> hth
> -Brian
>
> ==
> Brian Hamlin
> GeoCal
> OSGeo California Chapter
> 415-717-4462 cell
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list