[mapserver-dev] Memory leak in mapcache

Patrick Valsecchi patrick.valsecchi at camptocamp.com
Fri Apr 12 00:41:52 PDT 2019


Hi,

I'm using mapcache v1.6.1 (tested as well with a master build) in docker
and I can see huge memory increases in the apache process memory usage when
mapcache is used (it's the only thing this apache instance is serving). The
thing is configured like that:

<mapcache>
   <cache name="default" type="memcache">
      <server>
         <host>prod-2-4-c2cgeoportal-memcached</host>
         <port>11211</port>
      </server>
   </cache>

   ...

   <tileset name="map">
     <source>map</source>
     <cache>default</cache>
     <grid>swissgrid_005</grid>
     <metatile>5 5</metatile>
     <metabuffer>128</metabuffer>
     <format>image/png</format>
     <expires>3600</expires> <!-- 1 hour -->
     <auto_expire>13800</auto_expire> <!-- 4 hours -->
  </tileset>


I can see that memcached is used in it's stats and only mapcache uses it.

But the the memory usage of the whole mapcache container looks like that:
[image: image.png]

Each dip in usage is when the OOM kills one of the apache workers (out of a
maximum of 3 workers). I have configured a memory limit in docker at 512MB.
Nothing shows up in the apache logs.

Are there any known memory leaks? Do I have a bad configuration? I could
have the apache workers restarted every 10 queries, but that would be
utterly ugly and inefficient...

Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20190412/1942ff0a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 21279 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20190412/1942ff0a/attachment-0001.png>


More information about the mapserver-dev mailing list