Closed Sloth-on-meth closed 3 years ago
You need to increase your shm_size in compose
You need to increase your shm_size in compose
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: blakeblackshear/frigate:stable-amd64nvidia
build:
shm_size: '3G'
context: .
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /docker/frigate/config.yaml:/config/config.yml:ro
- /allejezusgrotedrive/frigate:/media/frigate
- /frigate/cache:/tmp/cache
- /dev/bus/usb:/dev/bus/usb
ports:
- 5002:5000
- 1935:1935
like this?
That is setting the shm_size for the build container. You need to set it up a level on the runtime container.
I'm not sure why you have a build section defined. Are you building a customized container?
That is setting the shm_size for the build container. You need to set it up a level on the runtime container.
I'm not sure why you have a build section defined. Are you building a customized container?
i have no idea what I'm doing, haha. this is what I found googling online. so would I put shm size under runtime?
editing the shm_size in compose worked
sorry to bother in here, but i have the same problem, and cannot verify shm-change. how to check?
does your docker-compose.yml from above with adding of shm_size: '2G'
really helps?
#version: "3.9"
version: "3.6"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
#restart: unless-stopped
# restart: on-failure
#restart: no
## image: blakeblackshear/frigate:<specify_version_tag>
image: blakeblackshear/frigate:stable-amd64
build:
shm_size: '2G'
context: .
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/src/frigate.yml:/config/config.yml:ro
- /usr/src/media:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 256000000000 # ~64gb shmz?
#size: 16000000000 # ~16gb
#size: 1000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
how do you verify that the shm-size increased?
edit: looks like it helped? is this really a change on container-level? or general?
root@debian1010:~# df -h /dev/shm
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
tmpfs 2,0G 0 2,0G 0% /dev/shm
edit2: on another system with ubuntu20 it looks different=irritating:
overlay 20G 11G 8.5G 55% /var/lib/docker/overlay2/421f24464edcc118148d60b52c4dbe3ddc13e4cec7f2eca7b4c1db5573d34e86/merged
shm 64M 25M 40M 39% /var/lib/docker/containers/128d138c129395b12932e43e3a17139d82afa8488647c982a77bbbd1ab88941a/mounts/shm
root@ub20-frigate:/usr/src# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.0G 0 3.0G 0% /dev/shm
Seems to have no effect on my docker-compose.yml.
my debian 10.10 host-system has 4GB RAM. maybe to little overall?
another issue here with the same problem stated, that it could be solved, as the documentation said, if shm-zize is increased on docker-level:
https://github.com/blakeblackshear/frigate/issues/1403#issuecomment-883243237 https://blakeblackshear.github.io/frigate/installation#calculating-shm-size
i created an /etc/docker/daemon.json
{
"debug": true,
"default-shm-size": "256M"
}
and rebooted my debain 10.10,
But how do i verify succesful change on container-level?
Ho to verify if docker is using this daemon.json?
docker version
docker stats
docker info
journalctl -xu docker.service
does not help out. seems still not solved in 2021 to check if daemon.json is used: https://github.com/moby/moby/issues/21559 , but [maybe hidden in the logs] (https://github.com/moby/moby/issues/31381#issuecomment-735671158), but the logs are full with stuff
i followed the documentation and calculated the value
but looks somehow too big for daemon.json. or is this 39MB for the one image calculation? if i use it, i still got the error..
could anybody clarify on some points? Maybe the documentation must be added with some valuable hints how to solve this bug?
Describe the bug Since i added a second reolink camera, after a while my feed crashes and doesnt restart for that camera.
Version of frigate 0.8.4-5043040
Config file Include your full config file wrapped in triple back ticks.
Frigate container logs
Frigate stats
FFprobe from your camera
Run the following command and paste output below 510WA
410W
Computer Hardware
Camera Info:
Additional context