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:
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 |
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. answered 09 Aug '12, 23:38 Frederik Ramm ♦ 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
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 I
(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 don
(10 Aug '12, 22:06)
OSMDeveloperBK
showing 5 of 8
show 3 more comments
|