NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I've followed the tutorial available here. The installation worked alright, but opening the tile in a browser leads to a 404 error. The only error from the server is "Failed to read cmd on fd 10".

After a long while, the tile is rendered (here, 1600 seconds):

renderd[18586]: DEBUG: DONE TILE default 13 4264-4271 2984-2991 in 1594.968 seconds debug: Creating and writing a metatile to /var/lib/mod_tile/default/13/0/16/11/170/136.meta

How can I solve this problem?

Thank you for your help. Regards, Alex.

asked 17 Jun '14, 16:32

ale42's gravatar image

ale42
41114
accept rate: 0%

edited 17 Jun '14, 22:51

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


Another possibility that could drastically slow down database access would be if for some reason the index creation process failed at import time?

permanent link

answered 19 Jun '14, 13:54

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

2

How can I check that? Or rebuild it?

(19 Jun '14, 13:57) ale42

To answer the first bit, when osm2pgsql completes it'll say something like "Osm2pgsql took 238s overall" (or much longer). It it doesn't say that, it hasn't finished, and indexes probably aren't created.

(28 Aug '16, 01:21) SomeoneElse ♦

You can increase the timeout in your mod_tile configuration, in your case a

ModTileMissingRequestTimeout 1800

would have made the browser wait for up to 1800 seconds instead of returning a 404 after a couple of seconds.

To achieve faster rendering, try one or a combination of the following:

  • have your whole OSM database in RAM or on an SSD disk, or at least on a RAID-10 volume of spinning disks;
  • tune your database (depends on machine, memory, and PostGIS version - often toying with PostGIS memory settings can help);
  • create more indexes (temporarily activate PostGIS logging to find out which queries take most of the time, then create specific index for those);
  • modify your map style to make less expensive queries;
  • pre-render the tiles that you expect are likely to be viewed.
permanent link

answered 17 Jun '14, 16:41

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for your answer Fred.

I will try to put the whole OSM database in RAM.

About the error (Failed to read cmd on fd 10),have you any idea if it can influence the very long time to render tile? How can this be fix?

Tks, Alex.

(19 Jun '14, 12:50) ale42
1

For info I mentioned the "failed to read cmd" issue here:

https://github.com/openstreetmap/mod_tile/issues/77

In my case it didn't have any adverse impact on serving tiles.

(19 Jun '14, 13:21) SomeoneElse ♦

Ok thanks for your answer.

I really don't understand why it's taking this long time to render these tiles.

I try to set up the same configuration on a virtual machine and it takes less than 5 seconds to render one tile. Here, I try this in a OVH server which is more powerfull. I really don't understand.

(19 Jun '14, 13:50) ale42

In that case I would start by comparing things like CPU usage, memory (including swap!) usage and I/O load (via iotop) as well as I/O wait ("wa" in top) between those two systems.

(19 Jun '14, 14:05) scai ♦

My configuration for the server is like this : - RAM : 64 Go DDR ECC 1600 Mhz - CPU : Intel Xeon E5-1620v2 - No SSD - 2 disks x 2 To SATA3HGST Ent. 7K4000

So I don't think my configuration is a problem, isn't it?

I check PostgreSQL queries and these queries don't take more than 1 or 2 ms. So, put the whole database will not be usefull, isn't it?

(20 Jun '14, 09:31) ale42

@ale42 did you resolve this? I have an incredibly slow tile server.

(16 Apr '15, 15:35) haroldship
showing 5 of 6 show 1 more comments

Follow this question

By Email:

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

By RSS:

Answers

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:

×341
×204
×80

question asked: 17 Jun '14, 16:32

question was seen: 12,105 times

last updated: 28 Aug '16, 01:21

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum