Docker crashing Raspberry Pi
**Describe Your Problem:**
I'm experiencing an issue with docker homebridge crashing a raspberry pi requiring a hard reboot to bring it back to life. One of my homebridge plugins has a memory leak, so I moved over to docker in hope that when homebridge crashed, the container would restart itself. However, it's now worse as I lose all access to the pi as it requires a full hard reboot, whereas previously homebridge would crash, I'd just log in to the pi and start it up again.

I'm not sure if the error at the end of the log is the error thrown before the Pi crashes. However, it's clear to see TuyaAccessory is causing issues when connections get closed (bulb disconnects from the WiFi and spams the logs). I've tried posting on the tuya-lan repo to no avail.

Has anyone experienced this and could help? I'm unclear if the memory leak is something that can be resolved, or if there is a better way to handle this with docker so the container restarts if the logs start spamming with closed connections?

**Logs:**

```
(node:423) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Middle
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
[TuyaAccessory] Closed connection with Kitchen Sink
(node:423) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[TuyaAccessory] Closed connection with Kitchen Door
[8/27/2019, 5:12:48 AM] SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_interface_addresses returned Unknown system error 23 (Unknown system error 23)
    at Object.networkInterfaces (os.js:198:30)
    at allInterfaces (/usr/local/lib/node_modules/homebridge/node_modules/multicast-dns/index.js:164:21)
    at Timeout.that.update [as _onTimeout] (/usr/local/lib/node_modules/homebridge/node_modules/multicast-dns/index.js:124:63)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
```

**Docker Start Command:**
docker-compose up -d

version: '2'
services:
  homebridge:
    image: oznu/homebridge:latest
    restart: always
    network_mode: host
    volumes:
      - ./config:/homebridge
    environment:
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8080
