Camera stream not loading sometimes and it is unstable

Camera model
Logitech C100

What is the problem?
Camera stream not loading sometimes and it is unstable, sometimes it appear on the spaghetti detective app but at the same time I get camera stream is loading on the octoprint local webpage.
it usually happens when the print starts, it get disconnected for few minutes to hours then come back suddenly again.

I am running octopi on raspberry pi 4 model B with 8gb sdcard class sdhc class 4

What did you already try to solve it?

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPrint 1.7.1
Python 3.7.3
OctoPi 0.18.0