[MapProxy] PostgreSQL connection pooling with Mapnik source

Jeremy Palmer JPalmer at linz.govt.nz
Thu Nov 3 11:39:22 PDT 2016


Hi All,

I’m testing MapProxy for seeding tiles to a cache using a mapnik source which has multiple PostGIS layers. I’ve noticed that PostGIS connections are not being reused between mapnik tile render sessions. Establishing a new PG connection per session is going to add overhead when rendering millions of tiles.

Is anyone aware of this issue or do I need to do extra configuration?

My command to seed is:

mapproxy-seed -f maptiles.yml -s seeds.yml -c 4

My mapnik 3.0.12 XML is using the default PostGIS parameters and should reuse connections according to the documentation:

http://mapnik.org/docs/v2.1.0/api/python/mapnik-module.html

    <StyleName>Bridge_Topo</StyleName>
    <Datasource>
       <Parameter name="type"><![CDATA[postgis]]></Parameter>
       <Parameter name="table"><![CDATA[(Select * From bridge) AS Bridge]]></Parameter>
       <Parameter name="key_field"><![CDATA[]]></Parameter>
       <Parameter name="geometry_field"><![CDATA[]]></Parameter>
       <Parameter name="extent_cache"><![CDATA[auto]]></Parameter>
       <Parameter name="extent"><![CDATA[18588719.8615001,-5939257.42937042,19869879.1530354,-4093884.06936018]]></Parameter>
       <Parameter name="dbname"><![CDATA[nz_data]]></Parameter>
       <Parameter name="host"><![CDATA[localhost]]></Parameter>
       <Parameter name="port"><![CDATA[5432]]></Parameter>
       <Parameter name="user"><![CDATA[postgres]]></Parameter>
       <Parameter name="password"><![CDATA[postgres]]></Parameter>
    </Datasource>
  </Layer>

Cheers
Jeremy


________________________________
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20161104/a503747a/attachment.html>


More information about the MapProxy mailing list