Announcement

Collapse
No announcement yet.

Memory Leak?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Memory Leak?

    Has anyone been noticing the Physical Memory and Virtual Memory for HSPI_JowiHue.exe increasing at an alarming rate? I setup a process monitor using Jon00's plugin to track this. Attached is a screen shot of HSPI_JowiHue.exe after 14 hours. The Plugin starts in the mid-30's and high-40's respectively and has climbed to over 200MB in that time frame. This graph is with a RaspBee using deCONZ and 4 ZigBee devices. The plugin works fine and all the devices perform as expected. There are no anomalies in the logs.

    I originally started with a Philips Hue Bridge with polling at 2 second intervals and the memory consumption was even higher (>600MB). CPU utilization was >40%. I then changed the polling frequency to 300 seconds (5 minutes) and the rate of increase dropped significantly (as did CPU utilization), but it was continuing to increase. It took about 4 days to get to ~200MB. That is what prompted me to try a RaspBee/deCONZ solution.

    Best as I can tell is that something that happens during polling is causing more memory to be consumed and then not being released when the polling is complete. And the more frequent the polling, the greater the rate of increase. All the while the plugin is working fine, the devices respond appropriately and there are no anomalies in the log files.

    Disabling and then re-enabling the plugin frees up all the memory but the cycle begins again once polling starts. To prevent the system from running out of memory, I setup an Event to disable and re-enable the JowiHue plugin once every 24 hours.

    I'd be curious if anyone else is seeing this and what, if anything, they have learned and are doing about it.

    Thanks,
    Craig
    Attached Files

    #2
    Craig,

    Is this issue still present after the reinstallation of the plugin?
    This could also explain the repeating message of deCONZ reconnecting?

    Wim
    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts

    Comment


      #3
      Hi Wim, thanks for getting back to me. The memory issue is still there and is up to 584MB as I am writing this. The deCONZ messages came back in the Homeseer log at exactly 06:15:18 this morning but at ~60 second intervals.

      At approximately the same time these messages showed up in the JowiHue trace at the same interval:

      06:15:04.5197508 -- (HueTools.MainWatchTimer) Debug: Checking plugin health 4/20/2018 6:15:04 AM
      06:15:18.6357380 -- (DeCONZCache.UpdateBridgeCache) UpdateBridgeCache already running for bridge Upstairs deCONZ. Throttling refresh to 30.5 seconds
      06:15:18.6357380 -- (BaseCache.ChangeTimer) BridgeCache: timer changed for Upstairs deCONZ
      06:15:18.6437424 -- (DeCONZCache.UpdateBridgeCache) Refresh bridge Upstairs deCONZ set to 30 seconds after establishing direct connection

      I'm running the standard Dredsen Elektronik RPi image for RaspBee and deCONZ version 2.5.20. My network traffic is quite low so I don't think it is losing a connection because of that. I will zip and send you the JowiHue trace log as well as my Homeseer log for you to look at.

      Thanks,
      Craig

      Comment


        #4
        Craig,

        I'm running the plugin on Linux on two different systems and I'm not seeing this. One system has two deCONZ and one Hue bridge, the other has only a Hue bridge. The one with three gateways has been running about 24 hours now and the JowiHue plugin is at 98M.

        I see those gateway warning messages now and then. One of the deCONZ gateways is connected over wireless and I did have an issue last week with connectivity and the warnings increased. Once I fixed the network issue the warnings stopped.

        You may be on to something that the repeat connection errors are causing the memory leak. But the repeat connection errors are not normal.

        Bill

        Comment


          #5
          Thanks Bill. I upgraded to v2.0.2.2 and the Physical Memory consumption has deceased considerably. But the Virtual Memory consumption is still off the charts (shown on attached). Coincident with the increased virtual memory consumption is an increase in CPU utilization. It sits at ~45% most of the time. Just to make sure there wasn't an interaction with other plugins, I disabled all of them and restarted Homeseer with just JowiHue running. No change. I'm running a relatively new HTS6 with Windows 10. BTW, the error messages regarding the connection are no longer there. The system and the plugin are working fine, except that things slow down when the CPU utilization increases. So in the meantime, I've just resigned myself to periodically stop and restart the plugin. I'll keep plugging away at this and perhaps I can find the source and a cure.

          Thanks,
          Craig
          Attached Files

          Comment

          Working...
          X