Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running render_list in container take forever to finish #462

Open
edwin opened this issue Jul 24, 2024 · 7 comments
Open

running render_list in container take forever to finish #462

edwin opened this issue Jul 24, 2024 · 7 comments

Comments

@edwin
Copy link

edwin commented Jul 24, 2024

Hi team,
im using fedora base image to run osm tiles on top of Kubernetes

https://github.com/openstreetmap/mod_tile/blob/master/docker/fedora/Dockerfile

and trying to generate some cache

render_list  -a -z 10 -Z 10 --num-threads=2 -m polaruang

with below renderd.conf

[polaruang]
URI=/osm_polaruang/
TILEDIR=/var/lib/mod_tile
XML=/home/openstreetmap-carto/style-my_osm.xml
HOST=localhost
TILESIZE=256
MINZOOM=0
MAXZOOM=20

process is started but somehow is not progressing at all for several hours

Rendering all tiles for zoom 10 from (0, 0) to (1023, 1023)

am i doing the right thing, and is there any way to see whether it is progressing or just stuck?

@edwin
Copy link
Author

edwin commented Jul 24, 2024

image

it has been like this for a whole night,
and the thing is, i dont even know whether it is progressing or just stuck idle doing nothing

@hummeltech
Copy link
Collaborator

hummeltech commented Jul 24, 2024

It could take quite some time with 2 threads as there are 16384 metatiles (1048576 tiles) needing to be rendered. You might try increasing --num-threads and --max-load to your number of CPUs/cores (e.g. --max-load $(nproc) --num-threads $(nproc).) You will likely want to change the num_threads setting in your renderd.conf file's [renderd] section(s) to -1 as well.

I also see at least one issue with your command. You need to adjust the --tile-dir option in order to match what you have set in your renderd.conf file.

render_list  \
        --all \
        --map polaruang \
        --max-zoom 10 \
        --min-zoom 10 \
        --num-threads 2 \
        --tile-dir /var/lib/mod_tile

@DeejayDoubleD
Copy link

Hey guys,

I have the same problem. I am trying to get renderd to work with the fedora docker file and it just doesn't work.

If I want to generate the cache with render_list then I get the same outputs as the oc but I have activated debug messages and it says "waiting for response" the whole time. I started render_list with min zoom 0 and max zoom 0.

I would assume it should render pretty fast if everything would work properly. Also when I want to get a tile over the Apache server per url the Apache says url 404 not found but in the logs the renderd gets the request and ends the request with "data is available on fd X" and "Failed to read cmd on fd X"
Can anyone help?

@DeejayDoubleD
Copy link

I found the problem. The full-entrypoint.sh edits the renderd.conf so the num_threads was "-1" in my case. The "-" is wrong. I edited my full-entrypoint.sh and then renderd works. The entry point script should be fixed.

@hummeltech
Copy link
Collaborator

hummeltech commented Jul 30, 2024

Hello @DeejayDoubleD, if you are building from the master branch, you should be able to use -1 which will use all of the available CPUs on your system:
https://manpages.debian.org/experimental/renderd/renderd.conf.5.en.html#num_threads

Let me know what number is shown for num_threads during startup when it is set to -1:

$ renderd --foreground
** INFO: 07:14:27.208: Renderd started (version 0.8.0)
** INFO: 07:14:27.208: Parsing renderd config file '/etc/renderd.conf':
** INFO: 07:14:27.208:  renderd: unix socketname = '/run/renderd/renderd.sock'
** INFO: 07:14:27.208:  renderd: num_threads = '24'
...

@edwin
Copy link
Author

edwin commented Jul 31, 2024

hi @hummeltech
had this error when running on either fedora or centos image
centos_error

somehow this error gone after using the ubuntu base image

https://github.com/openstreetmap/mod_tile/blob/3a633e619a824d6148e9a63d3570f9dbb841e9db/docker/ubuntu/Dockerfile

so yeah i have no idea why it happen but using ubuntu solve it

@hummeltech
Copy link
Collaborator

Thank you @edwin for the report, it looks like you might have discovered a bug, could you provide the commands you ran to get this error? I am not seeing it when running docker compose up --build fedora-rawhide. Also, what is your host operating system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants