Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG] (Memory allocation issue -> Homebridge fails to start due to memory allocation failure with homebridge-magichome-dynamic-platform plugin) #133

Open
kilianp07 opened this issue Feb 25, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kilianp07
Copy link

kilianp07 commented Feb 25, 2023

Logs

Debug mode enabled in Homebridge.
Reproduced the issue, resulting in the error message mentioned above.
When attempting to start Homebridge with the "homebridge-magichome-dynamic-platform" plugin enabled, the following error is displayed:

<--- Last few GCs --->
[21326:0x5cb3c50]    31593 ms: Scavenge 219.7 (237.7) -> 219.6 (238.2) MB, 14.7 / 0.0 ms  (average mu = 0.901, current mu = 0.782) allocation failure; 
[21326:0x5cb3c50]    31619 ms: Scavenge 220.1 (238.2) -> 220.0 (239.7) MB, 16.3 / 0.0 ms  (average mu = 0.901, current mu = 0.782) allocation failure; 
[21326:0x5cb3c50]    32579 ms: Mark-sweep 336.3 (355.4) -> 219.3 (289.6) MB, 448.3 / 0.0 ms  (average mu = 0.854, current mu = 0.737) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

This error prevents Homebridge from starting successfully.

To Reproduce

Steps to reproduce the behavior:

  1. Install and enable the "homebridge-magichome-dynamic-platform" plugin in Homebridge.
  2. Attempt to start Homebridge.
  3. Observe the error message mentioned above.

Expected behavior

Homebridge should start successfully with the "homebridge-magichome-dynamic-platform" plugin enabled.

Additional context

Context

I've already set the max-old-space-size option to 256 after the first occurrence of the error.
I've disabled all plugins except for Homebridge UI, and have determined that the issue is related to the "homebridge-magichome-dynamic-platform" plugin.

Host Hardware

Hardware: Raspberry Pi 3B+
OS: Raspbian Buster
Homebridge and MagicHome

Homebridge version: 8.19.3
Homebridge-magichome-dynamic-platform version: 1.9.7
Link to the MagicHome Device on the seller's website: N/A.

@kilianp07 kilianp07 added the bug Something isn't working label Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants