• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
webgui/ssh very slow .. high cpu usage
#1
Trying to find the cause why the RPI/pilight installation is responding very slow ..

My setup is with WLAN/ssh access. Normally working well, but (atm) not clear why it turns to be slow. Here are some logs, but not that complete to have a complete picture, sorry:

Log as of last night showing the problem with webserver worker
$ cat /var/log/pilight.log
Code:
[Oct 01 00:45:33:796510] pilight-daemon: ERROR: cpu usage too high 86.444274
[Oct 01 00:45:33:797330] pilight-daemon: ERROR: checking again in 10 seconds
[Oct 01 00:45:44:799453] pilight-daemon: ERROR: ----- Thread Profiling -----
[Oct 01 00:45:44:799994] pilight-daemon: ERROR: - thread lirc: 0.012278%
[Oct 01 00:45:44:800435] pilight-daemon: ERROR: - thread socket: 0.000000%
[Oct 01 00:45:44:800833] pilight-daemon: ERROR: - thread ssdp: 0.000000%
[Oct 01 00:45:44:801222] pilight-daemon: ERROR: - thread sender: 0.000000%
[Oct 01 00:45:44:801603] pilight-daemon: ERROR: - thread broadcaster: 0.000000%
[Oct 01 00:45:44:801980] pilight-daemon: ERROR: - thread updater: 0.027541%
[Oct 01 00:45:44:802392] pilight-daemon: ERROR: - thread 433gpio: 0.010731%
[Oct 01 00:45:44:802807] pilight-daemon: ERROR: - thread receive parser: 0.000000%
[Oct 01 00:45:44:809416] pilight-daemon: ERROR: - thread webserver worker #0: 96.184887%
[Oct 01 00:45:44:809967] pilight-daemon: ERROR: - thread webserver client: 0.000000%
[Oct 01 00:45:44:810357] pilight-daemon: ERROR: - thread webserver broadcast: 0.000000%
[Oct 01 00:45:44:810737] pilight-daemon: ERROR: - thread firmware upgrader: 0.006528%
[Oct 01 00:45:44:811139] pilight-daemon: ERROR: ----- Thread Profiling -----
Afais there is no such high number on the webgui header line!?

With 'normal' operation, on the Firefox console I have the following output:
Code:
The connection to ws://192.168.178.16:5001/websocket was interrupted while the page was loading. pilight.js:1203
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery-2.0.2.min.js:1
Empty string passed to getElementById(). jquery.mobile-1.4.2.min.js:8
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. jquery-2.0.2.min.js:5

pilight.js:1203 has:
Code:
            oWebsocket = new WebSocket("ws://"+location.host+'/websocket');
and is part of $(document).ready(function()

.. and
cat /var/log/pilight.log
Code:
[Oct 01 13:18:25:776594] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56524
[Oct 01 13:18:25:867545] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56525
[Oct 01 13:18:25:907639] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56526
[Oct 01 13:18:25:944921] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56527
[Oct 01 13:18:25:968274] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56528
[ Oct 01 13:18:26:58642] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56529
[ Oct 01 13:18:26:77649] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56530
[Oct 01 13:18:27:148995] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56531
[Oct 01 13:18:27:280957] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56532
[ Oct 01 13:18:28:32489] pilight-daemon: INFO: client connected, ip 192.168.178.20, port 56532
Is this 'normal' to change the port frequently?

Also I recognized the pilight.log file can be very big and I can't see a method to shrink/replace/delete that file automatically. Not clear if the logs can be a problem for the performance.

A next point is the WLAN accessibility .. for sure not a pilight problem. But with low WLAN signal does it harm pilight .. that way it has to loop too much, write logs etc and eats cpu power for the webserver worker?


Any further idea how to trace the situation better?

Guenter
 
Reply
#2
Guenter, I have the same problem when leaving a webgui open for some time with the webcam protocol and multiple pictures.
I haven't found a clue ..
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 136 08-13-2019, 05:43 PM
Last Post: curlymo
  Increased CPU usage with version 8.1.5 wimThoelke 13 417 08-07-2019, 08:38 PM
Last Post: curlymo
  High cpu usage Dergo 1 273 02-23-2019, 04:31 PM
Last Post: curlymo
  WebGUI emtpy since 8.0.8 Dergo 14 2,236 02-24-2018, 01:09 PM
Last Post: Dergo
  CONTACT devices | Webgui wupperpi 2 679 01-18-2018, 03:37 PM
Last Post: wupperpi
  [solved] Webgui 404-Error PT-Biker 2 936 11-11-2017, 09:49 AM
Last Post: PT-Biker
  pilight doesn't show the right status in webgui jurkla 8 2,467 11-17-2016, 09:41 AM
Last Post: gregnau
  pilight Error : default_sa_restorer_v2 & CPU High Tommybear1979 5 2,537 06-30-2016, 07:36 AM
Last Post: pilino1234
  pilight WebGui not working after reboot Frank_a 7 4,593 02-04-2016, 09:11 AM
Last Post: wo_rasp
Bug Bug report: gpio_switch does not accept high pin numbers woutput 2 2,370 10-12-2015, 03:54 PM
Last Post: woutput

Forum Jump:


Browsing: 1 Guest(s)