TileMill fails to load Europe imported data as tiles. What am I doing wrong?
- Dominant language
- CartoCSS
- Stars
- 703
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
First of all, what a great style library for CartoCSS! Looks great, and it is a perfect starting point for us, to style our maps in TileMill. I am a bit new to the concept of rendering our own tiles, but I am very happy that MapBox & opensource contributors make it easy for me to start.
The problem I am having though, with OSM-Bright in combination with an imported (osm2psql) Europe shapefile, is that 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?
I am running TileMill with OSM-Bright on an `EC2 c3.2xlarge`:
`8 x Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
15.8GB RAM / linux / TileMill 0.10.2`
The only changed settings of Postgres I have done are:
`work_mem = 2MB
maintenance_work_mem = 32MB`
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.
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?
Thanks for reading,
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`
Contributor guide
Research direction
No source file or test is named. Start by reproducing the Europe import in TileMill with OSM-Bright, then inspect the PostgreSQL settings, osm2pgsql command, and tile-query timeout behavior; done means identifying a concrete cause or documented practice that lets the full dataset render without unavailable tiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, postgresql
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100