ftp changes in 0.4.7 - synchronization of file uploads leads to overload #442
Replies: 2 comments 2 replies
-
Your analysis is correct apart from 2 points:
You could try to use the startup.sh script to come back to the old method.
|
Beta Was this translation helpful? Give feedback.
-
Thank you. I have implemented the change to use "ftppush.sh start &" in the system.sh startup script as you suggested - after about a day, it seems to be working great. I don't see any recordings left on the camera, and all appear to upload correctly. Looking at /tmp/ftppush.log, it looks to be running properly. As a failsafe, I do have the cameras reboot daily - so if for any reason the daemon fails, it should get restarted when the camera is rebooted. |
Beta Was this translation helpful? Give feedback.
-
I have noticed that the method that files are sent to the ftp server (if configured) are different now than they were in 0.4.3. Previously, as files were created on motion detection, they were sent to the ftp server after the event. Now, in version 0.4.7, it seems that the file upload occurs on the hour, when a new directory would be created on the camera to store motion events.
Also, if there is a problem with the file upload from the camera to the ftp server, it does not seem like the camera retries to send the directory of motion events, or if it does retry, it does not keep retrying, as I see old directories left on the camera.
The problem is when you have a number of cameras (perhaps 10), and they are all trying to send a large amount of data (a whole hour's worth of captures) up to the same ftp server at the very same time (i.e. on the first minute of the hour). Occasionally, some of the attempts to ftp the files fail. Also, if there is a retry period, and it is not randomly backed off, then all units will attempt to retry again, at the same moment.
The old method of sending the files as they were created was superior in producing a randomness to when cameras uploaded files, versus having them all synchronized to send at the same moment.
This issue seems to be related not only to having the same ftp server, but when the cameras are on the same wifi segment. I have noticed that cameras on other wifi segments did not experience the problem, leading me to believe it is a wifi overload happening at the moment all the cameras on the segment upload in sync.
Has anyone else noticed this?
Beta Was this translation helpful? Give feedback.
All reactions