Highlighted
Emerging Member
Posts: 66
Registered: ‎12-22-2015
Kudos: 40
Accepted Solution

Video cache fills up every two minutes, generating alerts. Even when nobody is using it.

[ Edited ]

We have a Debian machine running the NVR package, and it is _constantly_ filling up /var/cache/unifi-video. Constantly as in, this 1.2GB space goes from 1% to 100% every two minutes! Then I get an alert saying "Temporary video cache space is 100% full, some segments were not processed", followed by "Temporary video cache space was restored. Current usage: 13%".  (When the cache clears it's at 1%, but by the time the alert is generated saying it was cleared, it's already at 13%!)

 

The machine is managing 27 cameras, all of which are set to motion record.  When this behavior happens, none of the cameras will record.  Rebooting seems to clear up the problem for a while, but this is the second time we have seen it develop, so rebooting isn't a permanent fix.

 

To the best of my knowledge, this never happened prior to 3.9.3. Any suggestions?

 
 

Accepted Solutions
Emerging Member
Posts: 98
Registered: ‎12-20-2016
Kudos: 21
Solutions: 2

Re: Video cache fills up every two minutes, generating alerts. Even when nobody is using it.

The default startup routine uses 15% of your available memory for the tmpfs.  I'm sure there is a more elegant way to do this, but one way to increase that size is to modify this file:

/usr/sbin/unifi-video

 

edit line number 20 (as superuser, it's read-only by default):

TMPFS_SIZE=15%

 

Save the file and restart unifi video:

sudo service unifi-video restart

 

You could also try turning down the quality of the cameras to shrink the size of the temp chunks or add more memory to your system.   

View solution in original post


All Replies
New Member
Posts: 4
Registered: ‎02-02-2017

Re: Video cache fills up every two minutes, generating alerts. Even when nobody is using it.

I have just found this with one of my NVR's as well. I have 3 on 3.9.3. This one is no different and in fact has less cameras than the others. I know this issue appeared on 3.9.2 but I thought it had been corrected in this latest one.
Emerging Member
Posts: 98
Registered: ‎12-20-2016
Kudos: 21
Solutions: 2

Re: Video cache fills up every two minutes, generating alerts. Even when nobody is using it.

The default startup routine uses 15% of your available memory for the tmpfs.  I'm sure there is a more elegant way to do this, but one way to increase that size is to modify this file:

/usr/sbin/unifi-video

 

edit line number 20 (as superuser, it's read-only by default):

TMPFS_SIZE=15%

 

Save the file and restart unifi video:

sudo service unifi-video restart

 

You could also try turning down the quality of the cameras to shrink the size of the temp chunks or add more memory to your system.   

Emerging Member
Posts: 66
Registered: ‎12-22-2015
Kudos: 40

Re: Video cache fills up every two minutes, generating alerts. Even when nobody is using it.


@smccoll wrote:

The default startup routine uses 15% of your available memory for the tmpfs.  I'm sure there is a more elegant way to do this, but one way to increase that size is to modify this file:

/usr/sbin/unifi-video

 

edit line number 20 (as superuser, it's read-only by default):

TMPFS_SIZE=15%

 

Save the file and restart unifi video:

sudo service unifi-video restart

 

You could also try turning down the quality of the cameras to shrink the size of the temp chunks or add more memory to your system.   


FWIW this works great, though it's important to note that firmware upgrades overwrite this file, resetting the value to 15%.  After an upgrade, remember to edit the new file.  (Don't just overwrite it with a previously-edited version, as the contents of this file may change from one version to the next.)