[OSM-talk] Mapnik Tilecache Memory Error (Myanmar Cyclone Relief)

Jon Burgess jburgess777 at googlemail.com
Mon Jun 9 20:21:15 BST 2008


On Mon, 2008-06-09 at 18:48 +1000, Brett Henderson wrote:
> Tom Hughes wrote:
> > I may be being dense here, but this is openstreetmap-talk (not
> > even dev) not tilecache-talk... Is there not somewhere better you
> > should be going to with this where there will be experts in tilecache
> > that can help you?
> >   
> I've sent an email to the tilecache mailing list, just thought there 
> might be some folks around here familiar with this stuff.  As for 
> osm-dev versus osm-talk, I wasn't sure which was appropriate in this 
> case ...
> >
> > Well the obvious answer is that something in your apache configuration
> > is limiting the amount of memory that the daemons can use.
> >   
> Sounds reasonable, I'm not too familiar with the innards of apache.  
> It's a default fedora 8 install, I'll poke around and see what I can find.
> > Unless of course you really are managing to exhaust your physical
> > memory and swap - how big do your apache processes get?
> The machine has 2GB of RAM and isn't overly stressed.  The processes are all using around 115MB virtual memory, 24MB resident memory and 13MB shared memory.

My previous experience with tilecache suggested that it did not have
any mechanisms to limit the number of tiles that could be rendered
concurrently which could lead to lots of processes trying to render at
once.

The recent Mapnik builds try to mmap() the shapefiles while
rendering[1]. Since the largest shapefile is a few hundred MB this could
easily cause some issues if the file was mmap'd multiple times in a
single process. This might be a particular problem if you use a 32-bit
system in the multi-threaded Apache worker mode.

Perhaps you should try drastically cutting down the number of Apache
server processes and see if this resolves the issue.

Alternatively you might want to look at  mod_tile[2]. One of its design
goals was to achieve a well defined behaviour under load. It runs well
on the main tile.openstreetmap.org server.

[1] http://trac.mapnik.org/changeset/628
[2] http://wiki.openstreetmap.org/index.php/Mod_tile 

	Jon






More information about the talk mailing list