more G-Labs products

Author Topic: R352 Raspian stops working after 2hrs  (Read 7650 times)

March 30, 2014, 08:36:21 PM
Reply #15

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

based on the badfinger suggestion, I made a little modification to the XTenLib.
I removed some "lock" instructions.
I just re-uploaded the r356 package, so download it again.
Let's keep finger crossed!
Next I'll try to see diffs between 336 and current release, perhaps it will help in figuring out the problem.

Cheers,
g.
« Last Edit: March 30, 2014, 08:38:00 PM by Gene »

March 30, 2014, 08:38:13 PM
Reply #16

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
You gave us a password enabled build :-)

Can I just delete a file on Unix Level?

added later: I just removed the systemconfig.xml followed by factory reset :-))
« Last Edit: March 30, 2014, 08:54:05 PM by Jens »

March 30, 2014, 09:06:48 PM
Reply #17

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
What do you mean?
Did you encounter any problem installing it?

g.

March 30, 2014, 09:08:45 PM
Reply #18

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Installed!

To your question, no, installing was fine, but accessing it via http brought up the username/password dialog.

X10 seems to be very fast now, it took a while on the latest versions until the icon of the bulb went like "on" or "off" - now this is immediate.

Let's see how long it runs - maybe the story started with improving X10, there's a thread about it how long it takes to turn on/off X10 devices and changes were made - sorry just guessing for now.

The other raspberry is still running very very very slow ;-)

March 30, 2014, 09:36:50 PM
Reply #19

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
I just accessed HG from iPad and found some noticeable difference.

From entering the IP in the browser until CONTROL gets active and selectable it takes up to 5 times longer on versions 345 and up versus 336, even directly after HG reboot.

Maybe memory leak, because the main indicator is still its getting slower and slower and the Android app times out after approx 2hrs of uptime, web browser acces still works but very slow until it stops. First thing noticeable within the UI is icons do net fresh up after actions or it takes very long.

356 seems to be improved for X10.

MIG changes of version 345?

Cheers
Jens



March 30, 2014, 09:50:01 PM
Reply #20

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Now it already takes 15 times longer to access 356 than 336

352 on the other raspberry now times out on ipad but is stll accessible from pc tremendously slow.

different timeout settings in different browsers I guess

March 30, 2014, 10:38:58 PM
Reply #21

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Some minutes ago HG 356 stopped responding to Browser request via iPAD, still very very slow via PC Browser.

R352 might take a little longer to stop completely - maybe during tonight, I keep you posted early morning.

The more I think about it I think it is the webservice itself

March 30, 2014, 11:28:59 PM
Reply #22

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Do you keep the UI opened all the time?
This is something I didn't try yet.

g.

March 31, 2014, 01:02:57 AM
Reply #23

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

I don't think the problem is the webservice.
Since I was not able to really identify the problem I just tried to make some major code cleanup in XTenLib.
This new version use less cpu and has no monitors nor locks. Also got rid of some unneeded Thread.Sleeps.
I replaced the r356 deb with the new one. 

Cheers,
g.

March 31, 2014, 07:36:06 AM
Reply #24

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

no, the UI is not kept open. Although maybe Android keeps the connection even if in background - not 100% sure.

By accident I turned off the power yesterday evening from the 352 "screen device" - have to do it again.

Attached is my config,
I did remove the Wheatherunderground Key
and the Hue Bridge password

The 336 version which I installed yesterday evening is running like a charm and still as fast as expected.

I will now install your new version

Thanks
Jens
« Last Edit: March 31, 2014, 08:28:54 PM by Jens »

March 31, 2014, 08:06:04 AM
Reply #25

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

after Installation - quite fast - after a while again as slow as all the others.

But maybe I found something, because I deleted all 3 UpnP devices within my config
and HG started to be fast again.

What I noticed between 336 and 356 is the following.

The UpnP devices are autodiscovered, I add them as module within in a group called Media.
In 336 the devices show up with their Name (and ID and type) in 356 and all the other versions (I tested) later than 336, they don't have their Name (just ID and type).
In 336 the Name is automatically discovered, too.

Is HG trying to process something in regards to UpnP in the background which slows it down?

Keep you posted later today if it stays fast w/o UpnP devices.

Cheers
Jens
« Last Edit: March 31, 2014, 08:20:43 AM by Jens »

March 31, 2014, 02:26:38 PM
Reply #26

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
I'm now running hg with UPnP disabled.

Looking at the UPnP library source code I found out that it doesn't offer a way of stopping the service once activated, so I had to disable it from systemconfig.xml and restart hg.

What I can see now is that the cpu usage is reduced by 1/3 (3%-5% cpu and 14%-16% mem).

I'll let hg run for a couple of days, if cpu and memory usage remain stable, probably you found where the problem is.

Usually, with r35x releases, I experienced after about 12 hours an increase in cpu usage from 4%-5% to 8%-10% and also memory increase from 13%-15% to 18%-20%.

Will we spot the bug? =D

March 31, 2014, 08:28:21 PM
Reply #27

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

just came back and HG is dead - again. So uptime was around max 10hrs.

I did not disable UpnP in the Interfaces setup just erase the devices from the group this morning, I have done that now followed by a reboot.

In addition to what you spotted in the library please see the screenshots attached.

R336 includes "DENON" the UpnP Name of that device and R356 lacks this entry. So I would
assume that there was a code change.


Have you tried my config file?

Thanks
Jens

March 31, 2014, 09:19:55 PM
Reply #28

Jan

  • **
  • Information
  • Jr. Member
  • Posts: 34
I have to correct my earlier post in the other thread...

My raspberry also went dead today with r356 for the first time.
Haven't had any problems with earlier releases, though.

No changes/configurations made after the update.
But I always had upnp disabled before and only x10 on.
After the update upnp of course was active by default. But I didn't add any devices.


March 31, 2014, 10:06:17 PM
Reply #29

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
I can almost confirm that is an UPnP driver related problem. If active on startup, it will keep doing some work even if disabled later.
I have the source code of this library, but I am not going to look into this for now.
New release (that I will publish for testing tomorrow perhaps) has got upnp disabled by default, also it has lower cpu usage with an average of 5%, 3% min and 8% max, exception made for some webservice calls that will pump cpu to 90% for a couple of seconds. Also memory is stable to 15%.
It has been running for just 8 hours, so let's see tomorrow if things are still ok.