Help changing frigate shm size

Ubuntu 20.04 LTS on a NUC 7i7, docker-compose which I’m not very familiar with .

2023-05-01 17:18:00.287586285 [2023-05-01 17:17:57] frigate.app WARNING : The current SHM size of 67.1MB is too small, recommend increasing it to at least 110.59999999999995MB.

I used docker compose, and I edited the frigate.yml to be 128mb, but it’s not updating.

It needs to be updated in docker-compose

pi@nucpi:~/frigate$ docker-compose ps
ERROR:
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml

Looking for the file

pi@nucpi:/$ sudo find . -name docker-compose.yml
find: ‘./run/user/1000/gvfs’: Permission denied
find: ‘./run/user/134/gvfs’: Permission denied
find: ‘./proc/9805’: No such file or directory

Any tips on updating SHM size?

what command do you have that runs your docker compose? how did you set it up?

I installed docker and docker compose on the command line. Followed this youtube for setting up the frigate container Installing Frigate NVR On The Khadas VIM4 Ubuntu | Voltlog #429 - YouTube

then, per that video, the docker compose file would be called frigate.yml

that worked to change frigate.yml to docker-compose.yml. Now I can see the image. I still can’t adjust the size, perhaps wipe the docker image and redo?

No, changing the shm size is a very simple field in the docker compose file

version: "3.9"
services:
  frigate:
    container_name: frigate
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "64mb" # update for your cameras based on calculation above
    ...
1 Like

Correct, I edited the file after I spun up the docker. Which didn’t do jack.

Looks like I need to wipe the docker and re-spin it up.\

Just to avoid to open a duplicate topic I am getting quite a similar warning message:

WARNING : The current SHM size of 67.1MB is too small, recommend increasing it to at least 93.5MB.

However I’ve set in docker-compose.yaml the SHM size to 518mb!!

How can that happen? :joy:

usually it is because the wrong docker file was edited (some people accidentally have multiple), the shm_size value was put in the wrong spot, or user is running in portainer or some other system which overrides the value

Wait… so if I use (also) Portainer to manage my containers I get this weird issue?

I know this is old, but I came across this issue and needed to change my shm with portainer. There is a setting in portainer for the shared memory. It’s under Advanced container settings->Runtime & Resources->Shared memory size. You have to click the Duplicate/edit button to get there and redeploy the container. It worked to change my shm when it didn’t seem to take effect changing the compose file.

1 Like