I have my style sheet the way I want, and was able to use generate_tiles_multiprocess.py to generate my png tiles for zoom levels 4-12. My thought was to have the "big picture" be static png files, and then only query the database when someone zooms in past that since I don't need high detail of deserts, oceans and such. I have been having a hard time though where I can get it to work one way or the other, but it isn't working as I expected. What I thought was an incoming request would come for tile http://127.0.0.1/tiles/6/5/5.png If that file existed, Apache would serve it up, if it doesn't it would hand off the request to mod_tile / renderd to render the view, which was then stored as a .meta file.
Apache conf:
asked 17 Aug '18, 00:03 AlanHalls |
You have misunderstood how mod_tile and renderd are supposed to work. The generate_tiles_multiprocess.py script would not normally be used by someone who wants to set up a tile server. Instead, you would run a command like render_list which would generate meta tiles for the area and zoom levels specified. These meta tiles contain 8x8 PNG files each but the PNGs are never stored on disk directly. Instead, when a certain tile is requested through the web server, mod_tile will open the requisite .meta file, exrtact the PNG from there, and serve it. Only if the meta file is not there will mod_tile send a request to renderd to create it. The tile directory that you have built with generate_tiles_multiprocess.py could be used to run a tile server completely without renderd and database - simply point DocumentRoot to your tile directory - but of course that server would be fully static, and not support updating or on-the-fly rendering of tiles. answered 17 Aug '18, 09:48 Frederik Ramm ♦ Thank you so much for teaching me the difference. render_list is doing a great job and seems to be processing much faster than the png files.
(17 Aug '18, 17:39)
AlanHalls
|
Can you explain what "it isn't working as I expected" means? When you request a tile, do you get a "not found" error, or does it time out, or...? Anything in Apache's error log or in the syslog?
Great question. I have renderd running in debug mode so I can see what is happening. When I have it working with the png files, then nothing seems to get passed to renderd. When it works with meta files, it ignores the .png files. I have been using
sysdig -c echo_fds proc.name=apache2
to watch what is happening to see even stuff that wouldn't get logged, but it isn't providing the insight needed to solve it.When looking at the output from renderd, I shouldn't see any output for anywhere on the map at zoom levels 5-12 since those are already rendered as PNG files right? And why do I have files like ./6/0/0/0/2/128.meta and ./6/0/0/0/1/136.meta If you check the webhost http://64.72.211.216 you can see all the files are there for that zoom level, why would it create a meta?
Ah, I see now what has happened. proper answer following.