I have setup a local tile server by following this manual: https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/

I need to get tiles for USA, UK and Ireland. I've prepared a merged PBF file as described here: https://gis.stackexchange.com/questions/50745/merging-osm-files-with-osmosis-and-import-to-postgres-with-osm2pgsql

The merged file has been imported successfully. But when I run renderd and tried to open a sample tile in browser, the rendering has been failed (postgres stuck at the SQL query). The behavior was exactly the same as described here: https://help.openstreetmap.org/questions/24290/local-tile-server-extremely-slow-rendering

Here's the renderd log:

renderd[29977]: DEBUG: Got incoming connection, fd 8, number 1 renderd[29977]: DEBUG: Got incoming request with protocol version 2 renderd[29977]: DEBUG: Got command RenderPrio fd(8) xml(ajt), z(2), x(1), y(0), mime(image/png), options() renderd[29977]: DEBUG: START TILE ajt 2 0-3 0-3, new metatile renderd[29977]: Rendering projected coordinates 2 0 0 -> -20037508.342800|-20037508.342800 20037508.342800|20037508.342800 to a 4 x 4 tile renderd[29977]: DEBUG: Connection 0, fd 8 closed, now 0 left renderd[29977]: DEBUG: DONE TILE ajt 2 0-3 0-3 in 393.157 seconds debug: Creating and writing a metatile to /var/lib/mod_tile/ajt/2/0/0/0/0/0.meta

The rendering took 393 seconds!

I checked the postgresql indexes, all indexes were there:

\d planet_osm_polygon ... Indexes: "planet_osm_polygon_osm_id_idx" btree (osm_id) "planet_osm_polygon_way_idx" gist (way) Triggers: planet_osm_polygon_osm2pgsql_valid BEFORE INSERT OR UPDATE ON planet_osm_polygon FOR EACH ROW EXECUTE PROCEDURE planet_osm_polygon_osm2pgsql_valid()

I cleared the database then tried to install the test (Ireland) PBF file. For Ireland, the rendering took less than a second.

What I am doing wrong?

asked 07 Jan '19, 11:45

sevantus's gravatar image

accept rate: 0%

Zoom level two tiles are very large (and Ireland is a lot smaller than a single one), you should in general not expect these to render in a time frame that will work for interactive viewing and no number of exclamation marks is going to change that.

With other words these tiles need to be pre-rendered, see the instructions at the end of https://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/

permanent link

answered 07 Jan '19, 12:46

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%


That makes sense, thank you for the answer! I rendered some tiles on 13th zoom level and they are rendered within a second.

(07 Jan '19, 13:10) sevantus
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Jan '19, 11:45

question was seen: 742 times

last updated: 07 Jan '19, 13:10

powered by OSQA