Pre Render question
Hi,
I seen some way about Pre-Render from issue#15
I used render_list , render_list_geo.pl ,but it's just show
root@911a7c3b8f22:/home/renderer# render_list -a -f -z 10 -Z 10 x 106 X 107 y 54 Y 56
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 1 rendering threads
Rendering all tiles from zoom 10 to zoom 10
Rendering all tiles for zoom 10 from (0, 0) to (1023, 1023)
or
Rendering started at: Wed Feb 13 01:52:53 UTC 2019
Use of uninitialized value in addition (+) at ./render_list_geo.pl line 41.
Use of uninitialized value in addition (+) at ./render_list_geo.pl line 42.
Use of uninitialized value in multiplication (*) at ./render_list_geo.pl line 43.
Use of uninitialized value in multiplication (*) at ./render_list_geo.pl line 43.
Use of uninitialized value in multiplication (*) at ./render_list_geo.pl line 44.
Use of uninitialized value in multiplication (*) at ./render_list_geo.pl line 44.
render_list -a -z 10 -Z 10 -x 512 -X 519 -y 512 -Y 519 -n 2
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 2 rendering threads
Rendering all tiles from zoom 10 to zoom 10
Rendering all tiles for zoom 10 from (512, 512) to (519, 519)
Waiting for rendering threads to finish
There nothing happend in my server and /var/lib/mod_tile/ajt folder.
So my question is that only way just like you said "used script loop to force rendered tiles"?
or something I miss config for render_list/render_list_geo.pl?
Thank's for your reading. :)
Unfortunately I don't have experience with the render_list script, but you could check the CPU usage of the server with the docker container to see if mod_tile is rendering anything at all.
The render_list command that you posted is missing hyphens for x, X, y and Y.
Secondly, the image created by this repository names the map ajt and not default which is why the -m parameter of render_list is mandatory: -m ajt.
The following commands run successfully for me after the commands for the successful output mentioned in my comment in issue #12:
$ c=$(docker ps | grep "overv/openstreetmap-tile-server" | grep -Eo "^[0-9a-f]+")
$ docker exec -it "$c" render_list -a -f -m ajt -z 10 -Z 10 -x 106 -X 107 -y 54 -Y 56
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 1 rendering threads
Rendering all tiles from zoom 10 to zoom 10
Rendering all tiles for zoom 10 from (106, 54) to (107, 56)
Waiting for rendering threads to finish
*****************************************************
*****************************************************
Total for all tiles rendered
Meta tiles rendered: Rendered 1 tiles in 0.31 seconds (3.23 tiles/s)
Total tiles rendered: Rendered 64 tiles in 0.31 seconds (206.92 tiles/s)
Total tiles handled: Rendered 1 tiles in 0.31 seconds (3.23 tiles/s)
*****************************************************
Zoom 10: min: 0.3 avg: 0.3 max: 0.3 over a total of 0.3s in 1 requests
*****************************************************
*****************************************************
You did not post your command for render_list_geo, but the following worked for me (geo coordinates for ukraine, please notice the -m):
$ docker exec -it "$c" wget https://raw.githubusercontent.com/alx77/render_list_geo.pl/master/render_list_geo.pl
[...]
$ docker exec -it "$c" chmod +x render_list_geo.pl
$ docker exec -it "$c" ./render_list_geo.pl -f -m ajt -z 10 -Z 10 -x 21.8 -X 40.7 -y 44.03 -Y 52.6
Rendering started at: Wed Feb 13 21:28:51 UTC 2019
render_list -a -z 10 -Z 10 -x 574 -X 631 -y 335 -Y 375 -m ajt -f 1
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 1 rendering threads
Rendering all tiles from zoom 10 to zoom 10
Rendering all tiles for zoom 10 from (574, 335) to (631, 375)
Waiting for rendering threads to finish
*****************************************************
*****************************************************
Total for all tiles rendered
Meta tiles rendered: Rendered 48 tiles in 17.13 seconds (2.80 tiles/s)
Total tiles rendered: Rendered 3072 tiles in 17.13 seconds (179.37 tiles/s)
Total tiles handled: Rendered 48 tiles in 17.13 seconds (2.80 tiles/s)
*****************************************************
Zoom 10: min: 0.3 avg: 0.4 max: 1.9 over a total of 17.1s in 48 requests
*****************************************************
*****************************************************
Zoom factor: 10 finished at
Wed Feb 13 21:29:09 UTC 2019
Rendering finished at: Wed Feb 13 21:29:09 UTC 2019
@Overv Hi, It's OK. Your project is quite helpful for me, thank you. :)
@Istador
Hi,
I think you are right, I miss -m ajt for the command ,thank you. :)
Now render_listandrender_list_geo worked fine.
But I had a little question.
How can I know the setting for -x -X -y -Y ?
like sample from render_list_geo
this sample list the range of area
#Ukraine
./render_list_geo.pl -n 2 -m map_name -z 6 -Z 15 -x 21.8 -X 40.7 -y 44.03 -Y 52.6
#Belgium (using three threads)
./render_list_geo.pl -n 3 -z 6 -Z 16 -x 2.5 -X 6.5 -y 49.4 -Y 51.6
#The Netherlands
./render_list_geo.pl -n 2 -m default -x 3.275104 -X 7.103310 -y 50.758069 -Y 53.662826 -z 15 -Z 18
#Belgium (using 25 threads and a maximum load of 40)
./render_list_geo.pl -n 25 -l 40 -z 6 -Z 16 -x 2.5 -X 6.5 -y 49.4 -Y 51.6
So could I got the -x -X -y -Y range to know which area is ?
Because I just want to pre-render which area I need
Thanks for your reading.
For render_list_geo the Tile Calculator from Geofabrik is very helpful. You select the rectangular area you're interested in and it outputs the geographical bounding box coordinates and approximately how much space the rendered tiles will cost you for which zoom level.
The Simple Copy output seems to be in this order: x y X Y
@Istador Hi, Thank's you for the tool ,but I used that tool to render, it's worked but something seem strange.
here is my command and out put
root@e218773b76eb:/var/lib/mod_tile/ajt# render_list -a -m ajt -n 8 -f -z 18 -Z 18 -x 119.76 -X 122.03 -y 21.75 -Y 25.36
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 8 rendering threads
Rendering all tiles from zoom 18 to zoom 18
Rendering all tiles for zoom 18 from (119, 21) to (122, 25)
Waiting for rendering threads to finish
*****************************************************
*****************************************************
Total for all tiles rendered
Meta tiles rendered: Rendered 1 tiles in 0.37 seconds (2.73 tiles/s)
Total tiles rendered: Rendered 64 tiles in 0.37 seconds (174.47 tiles/s)
Total tiles handled: Rendered 1 tiles in 0.37 seconds (2.73 tiles/s)
*****************************************************
Zoom 18: min: 0.4 avg: 0.4 max: 0.4 over a total of 0.4s in 1 requests
*****************************************************
*****************************************************
root@e218773b76eb:/var/lib/mod_tile/ajt#
I run Zoom 18 tiles render , but /var/lib/mod_tile/ajt didn't render all this area range tiles...
just render a little tiles in /var/lib/mod_tile/ajt
and I run another Zoom ,it's the same situation. :(
Did I miss some config again ?
Thanks for your reading.
Yes, you made the mistake to use geo coordinates (longitude / latitude) with render_list and not with render_list_geo.pl.
render_list only takes tile coordinates (integers with x and y between 0 and 2^{z} - 1) as input and not geo coordinates (floats within x: ±180.0, y: ±90.0).
The usability problem with tile coordinates is that they are totally different on each zoom level for the same area.
render_list_geo.pl takes geo coordinates as input, calculates the tile coordinates for every zoom level and feeds them into render_list.
@Istador
Hi ,
Thank you so much for helping me solving a lot problem and mistake.
I used render_list_geo.pl to render all tiles.
Now every tiles were render correctly. :)
I have a problem that I can't find a solution to.
I'm doing a prerendering render_list -a -f -m ajt -z 1 -Z 1 / OK render_list -a -f -m ajt -z 2 -Z 2 / OK render_list -a -f -m ajt -z 3 -Z 3 / OK render_list -a -f -m ajt -z 4 -Z 4 / OK render_list -a -f -m ajt -z 5 -Z 5 / rendering failed with command 4, pausing
Zoom 1 - 4 are OK, then this error always comes.
render_list just stupidly delegates the rendering to the running renderd process.
Check the docker log of the run command. It's very verbose and might contain specific error messages.
Thank you for the fast answer.
I think I found the error:
renderer@gis ERROR: could not resize shared memory segment "/PostgreSQL.1244894217" to 4194304 bytes: No space left on device
Unfortunately I don't know how to help him. There is no size limit for the volume and I have already heard the RAM.
@Marcus-0815 That's a common error. The README even mentions the solution for it.
This happens because the docker default is 64M, but the postgres default setting for shared memory is 128M. Therefore postgres tries to allocate more than is available and fails.
Solutions:
- docker run option:
--shm-size=128M - docker-compose option:
shm_size: 128M
Better use more than 128M - just to be sure.
Many thanks for the answer. It was exactly because of that.
Had the part of README, but since I have already increased the memory
-e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \
I had wrongly excluded this.