I just passed a tirex-batch job to my tirex-master without passing the expiration argument. I just took a brief look into the tirex source but couldn't find anything regarding the default tile expiration time. So how does tirex handle this case? Is there a fixed/default tile lifespan for batch rendered tiles, or does tirex check the database for changes and decides wheter to rerender the tiles at each time a new request comes in? asked 04 Apr '16, 16:36 ltsstar |
This is a misunderstanding. The tirex-batch "expire" option,
specifies at what time a job should be removed from the queue if it hasn't been executed yet. It has nothing to do with the lifetime of a tile on disk. The default expire time is "never". How long a tile is kept on disk is not something that Tirex decides; Tirex renders tiles when told so, full stop. Whether or not Tirex is told to render a tile, in a standard tileserver setup, is controlled by mod_tile, the Apache module responsible for delivering tiles. In a normal setup, a tile that is older than the last full planet import will be considered "old" and queued for re-rendering; in the absence of a file indicating the time of the last planet import, a tile older than 3 days will be considered "old". This is hard-coded here: https://github.com/openstreetmap/mod_tile/blob/6b9611aaf763f4f776d1fd363433aac7e25cb34b/src/store_file.c#L41 There are various ways to handle tile expiry. One option is setting the "last full import" timestamp to something last year, and then using the "dirty tile list" that osm2pgsql can produce to change the timestamp of every tile that needs re-rendering to 1970-01-01. This will then cause mod_tile to trigger a re-render if such a tile is reuquested. Alternatively, the re-render can be triggered immediately from the osm2pgsql output, but that would mean that even tiles that are rarely ever looked at but change often, would also be computed often. answered 04 Apr '16, 18:11 Frederik Ramm ♦ |