I've got a couple of cheap crap cameras that do that, too, but not on a 30 second cycle. I've tried everything, new RJs, dielectric grease and being very careful to make sure there's no way for moisture ingress at the connections and still get it sporadically. Sometimes one of the cameras, the worst case POS, Reolink clone, seems to reboot for no apparent reason and loses its whole configuration. (gotta replace that POS and junk it, I won't unload it on anyone, just in the trash)
I'd try the new RJ route and dielectric grease, just in case. You didn't mention what camera type, but if it's a cheapy, they seem to be prone to it from my, limited, experience with them.