High Mysql and Apache load when camera can not be contacted
Posted: Fri Jul 19, 2019 7:29 am
I have a computer serving 1 camera, connected by USB to it, to ZoneMinder (the idea is to use, later, a Raspberry Pi with 5 cameras). I have coded a C++ app that reads the camera and publishes it as a REST service for ZoneMinder (so that I am using the Remote-HTTP source for that camera). In case is relevant: Because of the REST library I'm using, restbed, I can not easily serve (still working on it) multipart images, so at every call of http://xx.xx.xx.xx/cameras/0 I get a single jpeg image.
What happens is the following: If for some reason the camera is down, and I'm seeing the life feed, Apache starts spawning threads. Also, CPU usage due to Mysql sky-rockets... all of it boiling down to system load going well above 15 on a 2 core machine.
Is this expected behavior, or do I have a setting miss-configured somewhere?
Thank you!
What happens is the following: If for some reason the camera is down, and I'm seeing the life feed, Apache starts spawning threads. Also, CPU usage due to Mysql sky-rockets... all of it boiling down to system load going well above 15 on a 2 core machine.
Is this expected behavior, or do I have a setting miss-configured somewhere?
Thank you!