mfkrause / homebridge-people-pro

Homebridge plugin that provides details of who is in a Home + History (powered by fakegato)
MIT License
41 stars 2 forks source link

Memory Leak #23

Open Knilo opened 3 years ago

Knilo commented 3 years ago

Hi @mfkrause, really loving this plugin!

This week I started having an issue with People Pro having some sort of memory leak and using so much memory that it crashes the homebridge process:


<--- Last few GCs --->

[10820:0x4363118]    39958 ms: Mark-sweep (reduce) 466.1 (467.4) -> 465.8 (468.2) MB, 3094.4 / 0.1 ms  (average mu = 0.197, current mu = 0.005) allocation failure scavenge might not succeed
[10820:0x4363118]    44087 ms: Mark-sweep (reduce) 466.3 (469.2) -> 465.9 (469.4) MB, 4126.2 / 0.1 ms  (+ 0.0 ms in 8 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 4129 ms) (average mu = 0.098, current mu = 0.001) allo

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[12/06/2021, 19:54:44] [HB Supervisor] Homebridge Process Ended. Code: null, Signal: SIGABRT

This happens on startup. Would love your help in diagnosing and fixing the issue.

Here is the relevant config section. Wasn't able to isolate the issue through playing with the config:

{
            "people": [
                {
                    "name": "XXXXX",
                    "target": "10.0.0.12",
                    "type": "motion",
                    "threshold": 15,
                    "pingInterval": 10000,
                    "ignoreWebhookReEnter": 60
                },
                {
                    "name": "YYYYYY",
                    "target": "aa:XX:bb:YY:cc:ZZ",
                    "type": "motion",
                    "threshold": 15,
                    "pingInterval": 1000
                }
            ],
            "anyoneSensorType": "motion",
            "nooneSensor": true,
            "nooneSensorType": "motion",
            "webhookEnabled": true,
            "webhookPort": 51828,
            "platform": "PeoplePro"
        }
Knilo commented 3 years ago

Bump :)