The Problem:
Using OSM-Bright in combination with an imported (osm2psql
) Europe shapefile, tiles won't load unless I have 2-3 layers active (of the total of 29). I don't have this problem with an imported Netherlands or Amsterdam shapefile. So I'm assuming it has something to do with the sheer amount of data that gets returned by the queries?
My Setup:
I am running TileMill with OSM-Bright on an Amazon EC2 c3.2xlarge
:
8 x Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz 15.8GB RAM / linux ubuntu 14.04 trusty / TileMill 0.10.2
The only changed settings of Postgres I have done are:
work_mem = 2MB maintenance_work_mem = 32MB
Detailed description & what I have tried:
When loading the map, it seems as though the query times out. I have tried making a swapfile and monitoring memory when opening the project. The swapfile doesn't get touched and the memory gets drained to ~1% and stays there.
I won't get any errors when it 'times out' (tiles get the 'image not available' icon), not in the client interface, and when running TileMill via SSH there are no errors in the output. Very rarely I get a "PostGIS connection: null"
error in the TileMill interface. When this happens, I get { [Error: socket hang up] code: 'ECONNRESET' }
in the Tilemill log.
Screenshot:
Is there anything I can do to optimize the loading of the queries so I can work with the huge Europe dataset? Or is there any good practice in handling such large datasets with TileMill & OSM-Bright?
PS. for reference, this is the script I used while importing Europe into postgres (I don't know if it is relevant):
sudo osm2pgsql -c -G -C 14000 --cache-strategy sparse -U postgres -d osm /data/downloads/europe-shapefile/europe-latest.osm.pbf