Device Limit on Open Balena Server

Hello everyone,

I currently have an open balena server with 355 registered devices, and I’m unable to add any more. Could you confirm if there is a limit on the number of devices an open balena server can handle, or if there might be another issue preventing me from registering additional sensors?

Hi @luisgs7 , could you post more details about the server and where it is running. Also any logs from the API service would probably be useful. There isn’t anything outside of server resources that would limit this, so it might be due to the VPC instance you are running on.

Open balena application versions export

OPENBALENA_API_VERSION_TAG=v0.209.2 export OPENBALENA_DB_VERSION_TAG=v5.1.2 export OPENBALENA_MDNS_PUBLISHER_VERSION_TAG=v1.9.2 export OPENBALENA_REGISTRY_VERSION_TAG=v2.25.3 export OPENBALENA_S3_VERSION_TAG=v2.13.10 export OPENBALENA_VPN_VERSION_TAG=v11.4.6

balena os version 6.3.23 and 2.113.18.

I already have more than 100 raps0 and rasp3 sensors on this open balena server, and I am unable to provision new sensors using this command: journalctl -u balena-supervisor rasp0 returns the following logs.

Feb 28 13:21:51 5927cf5 balena-supervisor[4917]: [info]    Supervisor v14.9.4 starting up...
Feb 28 13:21:56 5927cf5 balena-supervisor[4917]: [info]    Setting host to discoverable
Feb 28 13:21:56 5927cf5 balena-supervisor[4917]: [debug]   Starting systemd unit: avahi-daemon.service
Feb 28 13:21:56 5927cf5 balena-supervisor[4917]: [debug]   Starting systemd unit: avahi-daemon.socket
Feb 28 13:21:56 5927cf5 balena-supervisor[4917]: [debug]   Starting logging infrastructure
Feb 28 13:21:58 5927cf5 balena-supervisor[4917]: [info]    Starting firewall
Feb 28 13:21:58 5927cf5 balena-supervisor[4917]: [warn]    Invalid firewall mode: . Reverting to state: off
Feb 28 13:21:58 5927cf5 balena-supervisor[4917]: [info]    Applying firewall mode: off
Feb 28 13:22:02 5927cf5 balena-supervisor[4917]: [success] Firewall mode applied
Feb 28 13:22:02 5927cf5 balena-supervisor[4917]: [debug]   Starting api binder
Feb 28 13:22:02 5927cf5 balena-supervisor[4917]: [debug]   Performing database cleanup for container log timestamps
Feb 28 13:22:03 5927cf5 balena-supervisor[4917]: [info]    Previous engine snapshot was not stored. Skipping cleanup.
Feb 28 13:22:03 5927cf5 balena-supervisor[4917]: [debug]   Handling of local mode switch is completed
Feb 28 13:22:04 5927cf5 balena-supervisor[4917]: (node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Feb 28 13:22:04 5927cf5 balena-supervisor[4917]: (Use `node --trace-deprecation ...` to show where the warning was created)
Feb 28 13:22:07 5927cf5 balena-supervisor[4917]: [info]    API Binder bound to: https://api.open.xxxxxx/v6/
Feb 28 13:22:07 5927cf5 balena-supervisor[4917]: [event]   Event: Supervisor start {}
Feb 28 13:22:07 5927cf5 balena-supervisor[4917]: [info]    Starting API server
Feb 28 13:22:08 5927cf5 balena-supervisor[4917]: [info]    Supervisor API successfully started on port 48484
Feb 28 13:22:08 5927cf5 balena-supervisor[4917]: [debug]   Ensuring device is provisioned
Feb 28 13:22:08 5927cf5 balena-supervisor[4917]: [event]   Event: Device bootstrap {}
Feb 28 13:22:08 5927cf5 balena-supervisor[4917]: [debug]   Connectivity check enabled: true
Feb 28 13:22:08 5927cf5 balena-supervisor[4917]: [debug]   Starting periodic check for IP addresses
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [info]    Reporting initial state, supervisor version and API info
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [debug]   VPN status path exists.
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [info]    Attempting to load any preloaded applications
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [info]    VPN connection is not active.
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [error]   LogBackend: server responded with status code: 401
Feb 28 13:22:09 5927cf5 balena-supervisor[4917]: [info]    Waiting for connectivity...
Feb 28 13:22:10 5927cf5 balena-supervisor[4917]: [info]    Applying target state
Feb 28 13:22:10 5927cf5 balena-supervisor[4917]: [info]    New device detected. Provisioning...
Feb 28 13:22:11 5927cf5 balena-supervisor[4917]: [event]   Event: Device bootstrap failed, retrying {"delay":30000,"error":{"message":"It is necessary that each device1 that is managed by a device2, belongs to an application1 that depends on an application2 that owns the device2.","stack":"ApiError: It is necessary that each device1 that is managed by a device2, belongs to an application1 that depends on an application2 that owns the device2.\n    at Object.<anonymous> (/usr/src/app/dist/app.js:2:314609)\n    at Generator.next (<anonymous>)\n    at fulfilled (/usr/src/app/dist/app.js:2:317664)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"}}
Feb 28 13:22:12 5927cf5 balena-supervisor[4917]: [event]   Event: Apply config change in progress {}
Feb 28 13:22:12 5927cf5 balena-supervisor[4917]: [debug]   Starting systemd unit: openvpn.service
Feb 28 13:22:13 5927cf5 balena-supervisor[4917]: [event]   Event: Apply config change success {}
Feb 28 13:22:18 5927cf5 balena-supervisor[4917]: [error]   LogBackend: server responded with status code: 401
Feb 28 13:22:19 5927cf5 balena-supervisor[4917]: [event]   Event: Network removal {}
Feb 28 13:22:23 5927cf5 balena-supervisor[4917]: [event]   Event: Volume removal {}
Feb 28 13:22:25 5927cf5 balena-supervisor[4917]: [debug]   Finished applying target state
Feb 28 13:22:25 5927cf5 balena-supervisor[4917]: [success] Device state apply success
Feb 28 13:22:38 5927cf5 balena-supervisor[4917]: [error]   LogBackend: server responded with status code: 401
Feb 28 13:22:41 5927cf5 balena-supervisor[4917]: [event]   Event: Device bootstrap {}
Feb 28 13:22:41 5927cf5 balena-supervisor[4917]: [info]    New device detected. Provisioning...
Feb 28 13:22:42 5927cf5 balena-supervisor[4917]: [event]   Event: Device bootstrap failed, retrying {"delay":30000,"error":{"message":"It is necessary that each device1 that is managed by a device2, belongs to an application1 that depends on an application2 that owns the device2.","stack":"ApiError: It is necessary that each device1 that is managed by a device2, belongs to an application1 that depends on an application2 that owns the device2.\n    at Object.<anonymous> (/usr/src/app/dist/app.js:2:314609)\n    at Generator.next (<anonymous>)\n    at fulfilled (/usr/src/app/dist/app.js:2:317664)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"}}

I would like to thank you in advance for your help and I am available to provide any other relevant information that may be useful in identifying and correcting the problem.