frigate: [Support]: 0.11.0 Release Candidate 2 Memory Leak

Describe the problem you are having

seems to be another memory leak in 0.11.0 Release Candidate 2. Anyone else seeing this?

Version

0.11.0 Release Candidate 2

Frigate config file

mqtt:
  host: 192.168.**.**
  user: *******
  password: *******

#detectors:
#  coral:
#    type: edgetpu
#    device: usb

detectors:
  cpu1:
    type: cpu
    num_threads: 2
  cpu2:
    type: cpu
    num_threads: 2
  cpu3:
    type: cpu
    num_threads: 2

birdseye:
  enabled: true
  width: 640
  height: 360
  quality: 1
  mode: motion

snapshots:
  enabled: true
  timestamp: false
  bounding_box: true
  crop: false
  retain:
    default: 14

# Optional: logger verbosity settings
logger:
  # Optional: Default log verbosity (default: shown below)
  default: info
  # Optional: Component specific logger overrides
#  logs:
#    frigate.event: debug
record:
  # Optional: Enable recording (default: shown below)
  enabled: true
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain:
    days: 7
    mode: motion
  # Optional: Event recording settings
  events:
    # Optional: Maximum length of time to retain video during long events. (default: shown below)
    # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
    #       will be the last x seconds of the event unless retain_days under record is > 0.
#    max_seconds: 300
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 60
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 60
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
    required_zones: []
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
#      default: 10
      # Optional: Per object retention days
      default: 14
      mode: active_objects
      objects:
        person: 14
rtmp:
  enabled: true

#objects:
#  track:
#    - person
#  filters:
#    person:
#      min_score: 0.4
#      threshold: 0.6

cameras:
  front_camera: # <------ Name the camera
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      inputs:
        - path: rtsp://user:password@ip:port/Streaming/channels/102 # <----- Update for your camera
          roles:
            - detect
            - rtmp
#            - record
        - path: rtsp://user:password@ip:port/Streaming/channels/101 # <----- Update for your camera
          roles:
            - record
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
      fps: 6
      max_disappeared: 25
      stationary:
        interval: 0
        threshold: 50
        max_frames: 
          default: 3000
          objects:
            person: 1000
    best_image_timeout: 30
    objects:
      track:
        - person
      filters:
        person:
          min_score: 0.4
          threshold: 0.5
          mask: 
            - 96,80,109,110,76,123,56,95 # Tree
            - 65,120,111,106,95,82,67,90 # Small Shrub by porch/driveway
            - 150,106,166,95,155,69,139,74 # mailbox
            - 25,35,212,37,210,22,26,22 # date and time
    zones:
      front_porch:
        coordinates: 640,131,640,0,412,0,431,128
#        filters:
#          person:
#            min_score: 0.3
#            threshold: 0.4
      house:
        coordinates: 0,212,315,0,0,0
#        filters:
#          person:
#            min_area: 200
#            max_area: 1000
##            min_score: 0.4
#            threshold: 0.6
      driveway:
        coordinates: 134,193,0,311,51,360,640,360,640,240
#        filters:
#          person:
#            min_score: 0.3
#            threshold: 0.4
    motion:
      contour_area: 50
#      threshold: 35
      mask:
        - 25,35,212,37,210,22,26,22 # date and time
        - 546,332,542,308,463,307,463,331 # camera name
      improve_contrast: true

  front_camera_2: # <------ Name the camera
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      inputs:
        - path: rtsp://user:password@ip:port/Streaming/channels/102 # <----- Update for your camera
          roles:
            - detect
            - rtmp
#            - record
        - path: rtsp://user:password@ip:port/Streaming/channels/101 # <----- Update for your camera
          roles:
            - record
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
      fps: 6
      max_disappeared: 25
      stationary:
        interval: 0
        threshold: 50
        max_frames: 
          default: 3000
          objects:
            person: 1000
    best_image_timeout: 30
    objects:
      track:
        - person
      filters:
        person:
          max_area: 5000
          min_score: 0.4
          threshold: 0.55 # Raised from .55 to .58 on 12/25
          mask: 
            - 371,53,370,79,357,77,356,57 # mailbox
            - 26,43,221,39,210,22,26,22 # Date and Time
            - 165,149,174,177,143,179,141,156 # Small bush is front of walkway ( added 12/25 )
            - 218,200,217,235,157,253,155,211 # Large bush in Side Yard (added 12/25)
            - 465,306,563,308,559,334,457,331 # Camera Name
            - 88,0,90,67,0,65,0,0 # Top Left Corner
    zones:
      side_yard:
        coordinates: 0,0,73,0,85,93,376,214,244,306,325,360,0,360
#        filters:
#          person:
#            max_area: 3200
##            min_score: 0.5
#            threshold: 0.7
      driveway:
        coordinates: 523,360,326,360,245,307,432,174,596,223
#        filters:
#          person:
#            min_score: 0.3
#            threshold: 0.4
      m_and_d:
        coordinates: 640,0,424,0,418,21,285,68,640,146
#        filter:
#          person:
#            min_area: 253
##            min_score: 0.4
#            threshold: 0.6
    motion:
      contour_area: 50
#      threshold: 35 #changed from 45
#      frame_alpha: 0.3
      mask:
        - 26,43,221,39,210,22,26,22 # Date and Time
        - 465,306,563,308,559,334,457,331 # Camera Name
      improve_contrast: true

  back_camera: # <------ Name the camera
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      inputs:
        - path: rtsp://user:password@ip:port/Streaming/channels/102 # <----- Update for your camera
          roles:
            - detect
            - rtmp
#            - record
        - path: rtsp://user:password@ip:port/Streaming/channels/101 # <----- Update for your camera
          roles:
            - record
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
      fps: 6
      max_disappeared: 25
      stationary:
        interval: 0
        threshold: 50
        max_frames: 
          default: 3000
          objects:
            person: 1000
    best_image_timeout: 30
    objects:
      track:
        - person
      filters:
        person:
          min_area: 675
          max_area: 15000
          min_score: 0.3
          threshold: 0.5
          mask: 
            - 214,147,243,145,239,120,215,122 # small shrub in front of patio
            - 546,332,542,308,463,307,463,331 # camera name
    zones:
      patio:
        coordinates: 80,360,320,243,92,77,0,104
#        filters:
#          person:
#            min_score: 0.3
#            threshold: 0.4
      yard:
        coordinates: 321,244,93,78,0,103,0,0,640,0,640,360,81,361
#        filters:
#          person:
##            min_score: 0.4
#            threshold: 0.6
    motion:
#      contour_area: 40
      mask:
        - 25,35,212,37,210,22,26,22 # Date and Time
        - 546,332,542,308,463,307,463,331 # Camera Name
      improve_contrast: true

Relevant log output

none

FFprobe output from your camera

will work on this if needed

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Hiks DS-2CD2142FWD-IS

Any other information that may be helpful

none

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 74 (2 by maintainers)

Most upvoted comments

so, Saturday morning I went through the process of trying to use a custom ffmpeg (jellyfin). When it didn’t work, I uninstalled jellyfin ffmpeg and removed the volume reference from my docker-compose and restarted frigate. Since then, memory has been rock solid. Makes absolutely no sense but…