Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Author Topic: PiX10Hub memory steadily diminishes over time  (Read 590 times)

shtckt

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 26
PiX10Hub memory steadily diminishes over time
« on: May 03, 2020, 04:10:08 PM »

When I login to HomeGenie, and first peruse the Dashboard, I have noticed within the Status Info program that MemFree can get alarmingly low. I have a PiZeroW. The memory free can be over 250Mb and a day or so later it will be below 100Mb. I have turned off both logs in HomeGenie to no avail. I did not notice the low MemFree until after we left the home for the holiday.

While we were on holiday earlier this year, I dared not do much from remote because I did not want my primary X10 interface to lock up or turn off. I do have some of the small programs on my Dashboard that allow RPi Memory Cleaner, RPi Drive Cleaner, Reboot, etc. If I used the Memory Cleaner program, after a period of time, the MemFree would return more memory but not always the maximum.

After we got home, I looked at what was changing. I used PuTTy and various versions of the "ls" listing command. All I noticed that was changing size was the homegenie_stats.db. Recently I reset the stats within the HomeGenie maintenance.

I have noticed that homegenie_stats.db file does not grow as fast as the MemFree dwindles. So it may not be my main source of sinking memory. I have kept PuTTY running and watch for MemFree to change. Then I go back to Putty to try to determine what changed. Just the stats file shrunk.

By the way, after coming home, I did let the MemFree run its course without running Memory Cleaner. I noticed one morning it was less than 20Mb. The next day I noticed my outdoor night lighting did not turn off when programmed. I tried but could not access my PiHub via my PC browser or the HomeGenie Plus  app. I access by Desktop shortcut and HG just did not answer. But I was able to access PiHub from PuTTY. After a "sudo shutdown', I unplugged the power supply and then reapplied power. It came back on. I checked and saw the MemFree was up over 250Mb.

I am baffled.  Any thoughts or things to try?
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 21
  • Posts: 1547
Re: PiX10Hub memory steadily diminishes over time
« Reply #1 on: May 03, 2020, 08:35:55 PM »

What are you running HG on. I'm guessing a Raspberry Pi. What version of HG are you running. What version of Raspbian are you running. What version of Mono are you running. Are you using the image of HG you downloaded from here. The symptoms you report are typical of a memory leak but I can only guess without any of the above information or any logs.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 271
  • Posts: 10083
  • I don't work for X10, I use it successfuly!
    • Tuicemen Forum
Re: PiX10Hub memory steadily diminishes over time
« Reply #2 on: May 04, 2020, 08:03:00 AM »

Besides providing what petera asks what size  SD card are you using. Although HG will work on a 4 gig card i recomend a 16 or larger. Since the memory is affected by swap files and logging a small card can get low on memory quickly with loging enabled.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 21
  • Posts: 1547
Re: PiX10Hub memory steadily diminishes over time
« Reply #3 on: May 04, 2020, 10:21:48 AM »

Firstly check the contents of the homegenie.log to see exactly what it is reporting using the following

tail -f /usr/local/bin/homegenie/homegenie.log

Next copy/paste the contents of the service daemon here. If the service daemon has been set up properly your server should never stop functioning. You can do this as follows

sudo nano /etc/systemd/system/homegenie.service

When finished copy/past press the Ctrl x keys to exit back to the terminal

Finally you can run HG in debug mode to examine exactly what is going on and what may be causing the problem. This can be done as follows

sudo systemctl stop homegenie.service

sudo mono /usr/local/bin/homegenie/HomeGenie.exe

When you have finished running HG in debug mode just press the Ctrl c keys to stop debug. To restart HG as follows

sudo systemctl start homegenie.service

The more information you can supply about your problem the easier it will be to troubleshoot. It sounds to me like you have other processes going on in the background on top of HG. This is really not advisable as they consume valuable resources. To check what other processes are consuming memory type the following at the terminal

htop

You can see in real time how your memory is being consumed. You should never have to restart the HG server other than for maintenance. Your service daemon handles restarts of your server crashes so you should never be without access to HG other than a hardware failure.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.