Large number of forwarded UDP ports break the device

I isolated this line as the cause of issues with my device:

      - "5656-5699:5656-5699/udp"

When this range of 44 UDP ports is published in addition to the existing 3 UDP and 6 TCP ports, I am unable to access my service via the 8443/TCP port.

I don’t know if this is because 8443/TCP is no longer published correctly, or because the device gets broken in a different way…

I can think of two possibilities now:

  1. My syntax for publishing multiple UDP ports is incorrect…
  2. Balena doesn’t support publishing that many ports – this should be either enforced at deploy time, or fixed if possible!

PS: For reference, this is exactly how I publish the ports:

Hey, it appears that this could be a docker/balena-engine issue. According to this issue: the engine will create a single process for each exposed port, which very quickly eats all of the available RAM (especially in an rpi). A workaround for this could be to use host networking on this container Would that work for you?

1 Like

Thank you for pointing to the GitHub issue!

Fortunately, I don’t actually need to forward those ports – my personal setup doesn’t require it.

However, host networking is an interesting idea! In fact, it will mean that I no longer have to keep tabs on what ports to publish, nor manually set the external hostname of the container ( ).

I think I’ll go with it! Thanks a ton!