openstreetmap / openstreetmap/mod_tile
"render_expired" doesn't use TILEDIR from map name in /etc/renderd.conf when deciding if tiles exist already
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 318
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
An example:
With /etc/renderd.conf containing
[s2o]
URI=/hot/
TILEDIR=/var/lib/mod_tile
XML=/path/to/mapnik.xml
HOST=localhost
TILESIZE=256
MAXZOOM=20
and a "dirty_files.txt" containing:
18/131010/87170
This command
sudo -u _renderd render_expired --map=s2o --min-zoom=1 --max-zoom=20 -s /var/run/renderd/renderd.sock < /path/to/dirty_tiles.txt
returns
Total for all tiles rendered
Meta tiles rendered: Rendered 0 tiles in 0.00 seconds (0.00 tiles/s)
Total tiles rendered: Rendered 0 tiles in 0.00 seconds (0.00 tiles/s)
Total tiles in input: 1
Total tiles expanded from input: 18
Total meta tiles deleted: 0
Total meta tiles touched: 0
Total tiles ignored (not on disk): 18
even when the corresponding metatile /var/lib/mod_tile/s2o/18/17/245/244/200/0.meta does exist.
However, when I comment out "TILEDIR", delete all cached tiles and generate the new tile for http:///hot/18/131010/87170.png (which creates a metatile below /var/cache - the default location), and rerun
sudo -u _renderd render_expired --map=s2o --min-zoom=1 --max-zoom=20 -s /var/run/renderd/renderd.sock < /path/to/dirty_tiles.txt
I get
Rendering client
Starting 1 rendering threads
render: file:///var/cache/renderd/tiles/s2o/18/17/245/244/200/0.meta
Waiting for rendering threads to finish
Total for all tiles rendered
Meta tiles rendered: Rendered 1 tiles in 12.67 seconds (0.08 tiles/s)
Total tiles rendered: Rendered 64 tiles in 12.67 seconds (5.05 tiles/s)
Total tiles in input: 1
Total tiles expanded from input: 18
Total meta tiles deleted: 0
Total meta tiles touched: 0
Total tiles ignored (not on disk): 17
It looks like whatever's deciding whether a tile already exists or not isn't looking at the location indicated by the map section in /etc/renderd.conf but always below /var/cache
This is with Ubuntu 22.04 set up as per the version of https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-22-04-lts/ that exists now** - the render_expired is from the mod_tile diistributed with 22.04.
** As I write this it has "TILEDIR=/var/lib/mod_tile" in the example there, which I suspect I should remove as it doesn't matter for that guide where tiles are created. Historically they were below /var/lb/mod_tile, but there's no reason they have to be there.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the render_expired entry point and the map section in /etc/renderd.conf, then reproduce the command using --map=s2o and the supplied dirty tile. Compare the existing-metatile check with the TILEDIR location and the default /var/cache/renderd/tiles location. Done means render_expired recognizes the metatile under the configured TILEDIR and reports it consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100