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

Hello,

I`m running a tile server on Ubuntu 12.04LTS according to the documentation of switch2osm.org using the openstreetmap ppa from kakrueger.

The geo-data doesn`t need to be update more than once in a month so I`ve set the caching times in mod_tile to one month - every cache duration setting I found in tileserver_site. When analyzing the tile requests with firebug the correct cache duration settings appear in the header.

However, three days after the tiles are being pre-rendered they are considered to be outdated and rendered again on-the-fly when being requested by a client! So my cache duration settings in the config-file tileserver_site seem to be ignored.

Now my questions:

How to enforce longer caching times? Where do I have to configure these settings to take effect? Does renderd ignore the mod_tile settings? What I do is: - touch the planet_import_complete after data-import with osm2pgsql - pre-render important and slow-rendered zoom-levels with render_list (Have to note that render_list tells me that it is missing the timestamp file:

Planet timestamp file (/var/lib/mod_tile//planet-import-complete) is missing

but after googling around this seems to be a bug, isn`t it?)

I would be really glad if there is someone out there to help me or give me a hint...

EDIT: As there are many comments I think it`s not a bad idea to summarize them:

The answer of Frederik Ramm was the key: My timestamp file had a wrong name. I had

planet_import_complete

in the right folder. But the name must be

planet-import-complete

After correcting the file name of the timestamp-file render_list was reporting a correct message indicating the last update of the timestamp.

asked 09 Aug '12, 20:15

OSMDeveloperBK's gravatar image

OSMDeveloperBK
21114
accept rate: 0%

edited 10 Aug '12, 22:24


What you see is consistent with the error message. When no planet-import-complete file is found, mod_tile will assume the planet file is three days old, and any tile older than three days will be re-rendered.

If this is indeed a bug then you better get yourself a mod_tile version that doesn't have the bug. Are you really sure that you have your planet-import-complete file in the right location? It must either be in /var/lib/mod_tile or in /var/lib/mod_tile/whatever-your-stylename-is.

permanent link

answered 09 Aug '12, 23:38

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 10 Aug '12, 08:33

Well, as I wrote in my question, there is the Planet timestamp in the location you mentioned and I`m always touching it after the data-import. But is the directory mentioned in the error message really existing? /var/lib/mod_tile//planet-import-complete

I mean the double slash before planet-import-complete This may indicate that the name of the Whatever-your-stylename-is that you mentioned in your answer is not set but expected? Where do I set that stylename? In the osm.xml or where? By the way, I`m using the German style created in a bachelor thesis you were responsible for.

(10 Aug '12, 08:37) OSMDeveloperBK
1

I don't know if the file really exists on your computer. Enter the command

[ -f /var/lib/mod_tile//planet-import-complete ] || echo "oh no, the file does not exist"

to check. The double slash should not be a problem. - You say you're always touching the file after data import but by that you mean once a month, or are you updating more frequently? If the file exists, then any tile older than the file timestamp will be re-rendered. So if you update your database every day but are happy to have old tiles lying around, then it would not be good to touch the file after each update....

(10 Aug '12, 08:43) Frederik Ramm ♦

Ah that means I should touch it before running render_list to prerender tiles? And what is whith the cache duration settings of mod-tile? Are they done relative to the timestamp? The file exists and everybody (especially www-data) has full access to it though your command seems to be incomplete.

(10 Aug '12, 08:56) OSMDeveloperBK
1

render_list does not look at the planet-import-complete file, it just renders whatever you tell it. Only mod_tile looks at that timestamp file. The cache duration settings are there to control how long the browser is told to keep the tile, they have nothing to do with how often the tile is rendered.

(10 Aug '12, 09:13) Frederik Ramm ♦

Now Ive checked my experimental map server installation inside a VM where the standard mapnik style is used and there render_list doesnt say that the timestamp file is missing. So I think in my case the style name is set to an empty string and so it cannot be found. (I think that because of the double slash in the path name of the error message) Where do I have to set the style name? Is it set during the import with osm2pgsql or within renderd.conf or the style-File or where?

(10 Aug '12, 09:50) OSMDeveloperBK
2

Usually the name is in your Apache configuration where you have the AddTileConfig directive. The first parameter is the web path, and the second is the style name.

(10 Aug '12, 09:57) Frederik Ramm ♦

Hmm, in my config file AddTileConfig is commented out and instead the following is used:

LoadTileConfigFile /etc/renderd.conf

But in renderd.conf there is no option/section for the stylename.

(10 Aug '12, 10:09) OSMDeveloperBK
2

Frederik, you were absolutely right: The timestamp file was missing on my system. I had planet_import_complete instead of the required planet-import-complete. Now render_list is not missing the timestamp anymore. In three days I should know it exactly. Thank you very much for this hint! BTW I faced a strange issue when configuring the german map style, but I dont know where to report this bug (?). Ive already described it here: http://forum.openstreetmap.org/viewtopic.php?pid=253552#p253552

(10 Aug '12, 22:06) OSMDeveloperBK
showing 5 of 8 show 3 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:

×105
×80
×44
×36
×20

question asked: 09 Aug '12, 20:15

question was seen: 11,223 times

last updated: 10 Aug '12, 22:24

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