bluecherry ramps up to consume all available memory before the process restarts, frees up the memory, and begins again. it cycles about every 1 to 1.5 minutes with 16gb of memory. at its max bluecherry is consuming about 12gb. the only thing i can think to do is to reinstall bluecherry or to update to ubuntu 24lts.
When did you notice this memory issue? What version did you upgrade from?
yes. I also encountered this problem.
Ubuntu server 24.04.1 LTS
and Bluecherry server Version: 3.1.2
but if i turn off my camera the memory is ok.
Help please.
I experienced the memory issue after a upgrade from 3.1.1 to 3.1.2 on Debian 11. I built another server with a minimal Debain 12 image and installed the Bluecherry server using the curl commands on the website. Same result, memory constantly being consumed. Please advise.
Thanks for the reports. We believe we identified the issue, we are building packages now.
Try this package (same version number, 3.1.3 isn’t released yet):
Ubuntu 20.04:
wget http://lizard.bluecherry.net/~curt/releases/3.1.2/focal/bluecherry_3.1.2_amd64.deb
Ubuntu 22.04:
wget http://lizard.bluecherry.net/~curt/releases/3.1.2/jammy/bluecherry_3.1.2_amd64.deb
Ubuntu 24.04:
wget http://lizard.bluecherry.net/~curt/releases/3.1.2/noble/bluecherry_3.1.2_amd64.deb
Ubuntu 23.10:
wget http://lizard.bluecherry.net/~curt/releases/3.1.2/noble/bluecherry_3.1.2_amd64.deb
Debian 12:
wget http://lizard.bluecherry.net/~curt/releases/3.1.2/bookworm/bluecherry_3.1.2_amd64.deb
then:
sudo dpkg -i bluecherry_3.1.2_amd64.deb
okay…
noble=24.04)
That has been fixed…
i upgraded from v3.1.1 to 3.1.2. after the update you suggested above nothing noticeably changed.
i decided to upgrade one of my two servers to 24lts and try the upgrade there. still having the same problem. i tried the above solution for 24lts but it threw some dependency errors.
(Reading database ... 252400 files and directories currently installed.)
Preparing to unpack bluecherry_3.1.2_amd64.deb ...
mysql: [Warning] Using a password on the command line interface can be insecure.
groupadd: group 'bluecherry' already exists
Unpacking bluecherry (3:3.1.2) over (3:3.1.2) ...
+ '[' -f /usr/share/debconf/confmodule ']'
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/bluecherry.postrm upgrade 3:3.1.2
+ '[' -f /usr/share/debconf/confmodule ']'
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
+ case "$1" in
+ '[' -z '' ']'
+ '[' upgrade = purge ']'
+ '[' upgrade = remove ']'
+ '[' upgrade = purge ']'
+ '[' upgrade = purge ']'
+ db_stop
+ echo STOP
+ cronfile=/etc/cron.d/bluecherry
+ test -f /etc/cron.d/bluecherry
+ rm /etc/cron.d/bluecherry
+ warn_user_db
+ var_command='Warning!\n\nYou must run this command to finish the removal process or else you will not be able to reinstall Bluechery again\n***\necho DROP USER @localhost | mysql -hlocalhost -u root -p\n***\n\n'
+ printf '\x1b[31mWarning!\n\nYou must run this command to finish the removal process or else you will not be able to reinstall Bluechery again\n***\necho DROP USER @localhost | mysql -hlocalhost -u root -p\n***\n\n\x1b[0m\n'
Warning!
You must run this command to finish the removal process or else you will not be able to reinstall Bluechery again
***
echo DROP USER @localhost | mysql -hlocalhost -u root -p
***
dpkg: dependency problems prevent configuration of bluecherry:
bluecherry depends on libopencv-core4.5d (>= 4.5.4+dfsg); however:
Package libopencv-core4.5d is not installed.
bluecherry depends on libopencv-imgcodecs4.5d (>= 4.5.4+dfsg); however:
Package libopencv-imgcodecs4.5d is not installed.
bluecherry depends on libopencv-imgproc4.5d (>= 4.5.4+dfsg); however:
Package libopencv-imgproc4.5d is not installed.
dpkg: error processing package bluecherry (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Processing triggers for rsyslog (8.2312.0-3ubuntu9) ...
Errors were encountered while processing:
bluecherry
Tried it on Ubuntu Server 22.04 LTS, still leaking, I crontab restart the bluecherry service every 30 minutes for now.
codec h264 with audio on every camera (they all put out log)
The log is filled with:
bluecherry bc-server[5944]: I(1/Camera 1): Making a snapshot
bluecherry bc-server[5944]: E(1/Camera 1): avcodec_send_frame: snapshot encoding failed: Invalid argument
bluecherry bc-server[5944]: E(1/Camera 1): failed to write snapshot frame
bluecherry bc-server[5944]: E(1/Camera 1): Feeding snapshot decoder failed
bluecherry bc-server[5944]: E(1/Camera 1): Failed to make snapshot
I have also upgraded for Debian 12 as suggested but it did not seem to work and I have the same memory issue. 1 thing noted as I did the upgrade, rsyslog was needed but was not installed so the upgrade could not complete until I installed rsyslog, then the upgrade went fine.
Are you using 3.1.3?
Sorry fir the dealy, I am using the file that was in the link you provided. 3.1.2 is what s displayed.
It looks like I also have the errors that the Ubuntu user reported. systemctl status bluecherry shows these lines. This is a sample. Other cameras also have the same messages:
Sep 05 17:45:33 CamSVR bc-server[52775]: I(3/Driveway): Last message repeated 78 times!
Sep 05 17:45:33 CamSVR bc-server[52775]: I(3/Driveway): Making a snapshot
Sep 05 17:45:34 CamSVR bc-server[52775]: E(3/Driveway): avcodec_send_frame: snapshot encoding failed: Invalid argument
Sep 05 17:45:34 CamSVR bc-server[52775]: E(3/Driveway): failed to write snapshot frame
Sep 05 17:45:34 CamSVR bc-server[52775]: E(3/Driveway): Feeding snapshot decoder failed
Sep 05 17:45:34 CamSVR bc-server[52775]: E(3/Driveway): Failed to make snapshot
Okay, can you try 3.1.3? It should be in the repos now.
I tried repo and still shows 3.1.2. I did the install anyway. GUI shows 3.1.2.
Should I bet grabbing it somewhere else?
root@CamSVR:/tmp# apt list bluecherry
Listing... Done
bluecherry/bookworm 3:3.1.2 amd64 [upgradable from: 3:3.1.2]
N: There is 1 additional version. Please use the '-a' switch to see it
root@CamSVR:/tmp# apt list bluecherry -a
Listing... Done
bluecherry/bookworm 3:3.1.2 amd64 [upgradable from: 3:3.1.2]
bluecherry/now 3:3.1.2 amd64 [installed,upgradable to: 3:3.1.2]
root@CamSVR:/etc/apt/sources.list.d# cat bluecherry-bookworm.list
# Please post any problems to http://forums.bluecherrydvr.com or debian@bluecherrydvr.com
deb http://unstable.bluecherrydvr.com bookworm main # Bluecherry Debian 12 packages
I updated the repo and upgraded. The system is now on 3.1.3 per GUI. After about 9 minutes of the system reboot memory usage was at 13G of 16G.
now using 3.1.3 on 24lts for one server and 3.1.3 on 22lts for another server and i see no change in the memory problem. it installed fine though.
We are still trying to find the source for this memory leak. Currently the recommendation is downgrade to 3.1.1:
sudo apt install bluecherry=3:3.1.1