Octoprint and Unifi controller on RP4B 8GB Webcam Problem

Ha all,

I have Octoprint on a Raspberry PI 4B with 8GB memory.
A Unifi controller is also on this Raspberry.
This works well and i have 7106 MB Free.

When i connect a USB Logitec Webcam, the Unifi controller will not start and de "server.log" give my a Java out of memory error.

the webcam works in Octoprint.

How can I fix this, thank you in advance.

maybe out of gpu memory?
Does the controller use a gui?

No.
I have a Octoprint image put on a SD card and then install the Unifi program.

I found several posts about this issue in the Unifi forums - some a few years old, some newer.
Seems to be a rare problem but you're not alone.
I don't use that software so I can't tell you much but I would try what the UI-Team person suggested in this thread:

Take a settings only backup and reinstall the controller.

If that doesn't help I would suggest you post your question again at the Unifi forums.