404 past a certain zoom level and other memory questions

Hello all,

I am new to OSM and building tile servers, but I’m happy to be part of the community!

I recently built a tile server using the below guide provided by @SomeoneElse.
https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1604_tileserver_load

It works well (if not a bit slow).

However, whenever I go past a certain zoom level (it was 10 before, now it is 12), the tile server responds back with a 404.

For example:
http:///hot/11/1016/665.png
gives back the tile as it should.

but

http:///hot/12/4060/2671.png
gives me a 404, and kills renderd

renderd[26715]: DEBUG: Got command RenderPrio fd(28) xml(ajt), z(13), x(4061), y(2671), mime(image/png), options()
renderd[26715]: DEBUG: Got incoming request with protocol version 2
renderd[26715]: DEBUG: Got command RenderPrio fd(27) xml(ajt), z(13), x(4064), y(2672), mime(image/png), options()
renderd[26715]: DEBUG: Got incoming connection, fd 29, number 18
renderd[26715]: DEBUG: Got incoming request with protocol version 2
renderd[26715]: DEBUG: Got command RenderPrio fd(29) xml(ajt), z(13), x(4062), y(2672), mime(image/png), options()
renderd[26715]: DEBUG: Got incoming connection, fd 30, number 19
renderd[26715]: DEBUG: Got incoming request with protocol version 2
renderd[26715]: DEBUG: Got command RenderPrio fd(30) xml(ajt), z(13), x(4061), y(2672), mime(image/png), options()
renderd[26715]: DEBUG: Got incoming connection, fd 31, number 20
renderd[26715]: DEBUG: Got incoming request with protocol version 2
renderd[26715]: DEBUG: Got command RenderPrio fd(31) xml(ajt), z(13), x(4063), y(2672), mime(image/png), options()
renderd[26715]: DEBUG: Got incoming connection, fd 32, number 21
renderd[26715]: DEBUG: Got incoming request with protocol version 2
renderd[26715]: DEBUG: Got command RenderPrio fd(32) xml(ajt), z(13), x(4060), y(2671), mime(image/png), options()
Killed

I’m wondering if this may be a memory thing
Here is what I get when I run “free mem”


              total        used        free      shared  buff/cache   available
Mem:        1014516      254108      509312      165544      251096      469748
Swap:             0           0           0

How do I know what is enough memory?
How do I stop renderd from crashing?
Is there a better way to debug this?
Is there a way to cache every tile for quick loading or is that too much of a strain?
If you cache everything, how do you change it when you update the map?

Thank you all!

If renderd is getting killed because it’s out of memory, try:

o allocating more memory if you can (easy for a VM, not so easy if not)

o using fewer parallel rendering threads. Reduce “num_threads=4” in renderd.conf to a smaller number.

Is there a way to better debug why it is crashing?

Beyond “because it’s running out of memory” it’s difficult to say. I’ve never looked into how (for example) changing style would change the memory footprint.

Try running renderd in foreground by using “-f” or “–foreground”

regards
walter

Hey Walter. Thanks for the help. The above message where it says it was killed is when I was running it in the foreground. However, the debug messages are not helpful. Is there a way I can get the error messages that are killing it?

check /var/log/syslog. may be there is something like “OOM Killer”
see https://unix.stackexchange.com/questions/153585/how-does-the-oom-killer-decide-which-process-to-kill-first#153586

using linux another way is using strace. eg strace -o renderd.trace -f -s 1024 renderd -f …

walter