more G-Labs products

Author Topic: UI lock up  (Read 1425 times)

April 22, 2015, 02:49:17 PM
Read 1425 times

NickP

  • *
  • Information
  • Newbie
  • Posts: 24
Hello

I have a problem with r484 where the system keeps on running but the UI stops functioning.
Stage 1
Specifically the first thing I noticed is that clicking on a program doesn't bring up the program dialog, just a never ending wait circle.
Clicking on Control brings up the dashboard with the same never ending circle but if I select Color Lights it works then I can switch back to Dashboard and see the content

Stage 2
All control panels show undefined / Unknown Module / Module not available.
Event logging still works and the programs seem to be active (an LCD attached keeps updating).
Program List shows but can't open a program and all running programs how as amber.
Event Scheduling screen appears to be fully functional as is Settings & Maintenance and Updates

I have tried Factory Reset and Restore which gets things going for a few hours then back to undefined / unkown etc.

Any pointers on what I could try next?

Thanks
Nick

April 25, 2015, 08:57:53 AM
Reply #1

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544

Launch HG in command line to see if there is more information about your bug :
Code: [Select]
mono /usr/local/bin/homegenie/HomeGenie.exe
Perhaps one of your script overload HG. Did you take a look at "top" and the mono process usage ? Did you try to disable your scripts ?

May 14, 2015, 02:47:28 AM
Reply #2

NickP

  • *
  • Information
  • Newbie
  • Posts: 24
top shows hg hovering around 5-6 %, none of my scripts are enabled.

It worked after a reboot today then a few hours later same symptoms.

No errors from Mono. Clicking on the dashboard shows this :
2015-05-13T20:37:32.1945530-04:00       MIG.Gateways.WebServiceGateway  192.168.5.44    hg/html/pages/control/widgets/jkUtils/SolarAltitude/SolarAltitude.html  HTTP   GET
2015-05-13T20:37:32.2644920-04:00       MIG.Gateways.WebServiceGateway  192.168.5.44    hg/html/pages/control/widgets/homegenie/generic/timetable.html  HTTP    GET
2015-05-13T20:37:32.3735860-04:00       MIG.Gateways.WebServiceGateway  192.168.5.44    api/HomeAutomation.HomeGenie/Config/Modules.List/1431563683776  HTTP    GET
2015-05-13T20:37:32.4848550-04:00       MIG.Gateways.WebServiceGateway  192.168.5.44    hg/html/test    HTTP    GET




hg/html/test looks suspicious, there is no "test " in the html folder.

May 15, 2015, 03:24:47 AM
Reply #3

hybridview

  • **
  • Information
  • Jr. Member
  • Posts: 37
I've noticed that many periodic async polls take 10-15 seconds to finish while sitting idle on the CONFIGURE page, for example. In some cases during navigation of the site, these stack up a bit and lock the UI for a little while (most often for the first few minutes of using the site after opening the browser). I monitor server resources (disk queue length and CPU), and see no bottlenecks. My client machine also has no obvious bottlenecks and has a gig net connection. It is odd, since I see no reason anywhere for a slow response.

Except for the few delays and occasional blips, the application works well. I may investigate this a bit more out of curiosity and will post back if I find anything.

NOTE: I use the chrome browser with dev tools to monitor async request time lines.

May 15, 2015, 03:41:19 AM
Reply #4

hybridview

  • **
  • Information
  • Jr. Member
  • Posts: 37
Some more info:

Response size does not appear to be a factor. Also, TTFB (time til first byte) is over 10 sec, so server is not responding for some time.

When analyzing event time lines, I see nearly 20 timer events get fired one after the other right before an async response is received, with a combined delay of over 10 seconds. Most events are fired by jquery.flot.resize, and the others are from eventsource.js.

jquery.flot is a charting library. Since there is no chart on the page I am analyzing, there seems to be a lot of unnecessary event firing going on. This looks suspicious, so I'll target that one for my next analysis.

UPDATE::::

I disabled flot as a test and not much change, so scratch that.

Calls from Eventsource.js still take over 10 seconds when querying interfaces, so I'll look there.
« Last Edit: May 15, 2015, 03:48:12 AM by hybridview »

May 15, 2015, 05:12:13 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
FWIW, I have noticed that the Windows installation (WinXP in my case) was much faster than my RPi B.  I have not run on Windows in months, but when I was testing, I found that the same page would load in a second from Windows but took 10-30 seconds to load (at least the first page) on the RPi.  This is even more noticeable when performing a backup.  Windows will pop up the save dialog almost immediately whereas RPi will take a good 2 minutes.