Hi
I’ve got an error similar to the ones that have been discussed in these threads:
https://community.openenergymonitor.org/t/emonpi-low-write-9-8-25-inputs-stopped-working/
https://community.openenergymonitor.org/t/mqtt-input-service-high-memory-usage
It’s been happening regularly for a while. I’ve been restarting emonhub each time and was hoping a fix would pop out of the above threads. However, emonPi has stopped logging readings locally, but is still sending them to emoncms.org. I’m not sure if this is happening in other cases? I’m pretty sure it wasn’t doing this before…
local emoncms feeds look like this:
remote feeds look like this:
the emoncms.log file contains the following:
2018-04-23 08:00:23.271|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:00:24.270|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:00:33.780|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:00:35.581|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:10:09.712|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:10:11.093|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:10:35.620|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:10:38.882|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:10:50.367|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:10:50.940|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:11:36.846|ERROR|phpmqtt_input.php|exception 'ErrorException' with message 'Division by zero' in /var/www/emoncms/Modules/process/process_processlist.php:571
Stack trace:
#0 /var/www/emoncms/Modules/process/process_processlist.php(571): exceptions_error_handler(2, 'Division by zer...', '/var/www/emoncm...', 571, Array)
#1 [internal function]: Process_ProcessList->kwh_to_power('18', 1524471096, 10583.32236375, NULL, Object(Process))
#2 /var/www/emoncms/Modules/process/process_model.php(61): call_user_func_array(Array, Array)
#3 /var/www/emoncms/Modules/process/process_model.php(104): Process->__call('kwh_to_power', Array)
#4 /var/www/emoncms/Modules/process/process_model.php(104): Process->kwh_to_power('18', 1524471096, 10583.32236375, NULL)
#5 /var/www/emoncms/scripts/phpmqtt_input.php(281): Process->input(1524471096, '4112', '1:8,2:0.11192,3...')
#6 [internal function]: message(Object(Mosquitto\Message))
#7 /var/www/emoncms/scripts/phpmqtt_input.php(116): Mosquitto\Client->loop()
#8 {main}
2018-04-23 08:11:49.126|ERROR|phpmqtt_input.php|exception 'ErrorException' with message 'Division by zero' in /var/www/emoncms/Modules/process/process_processlist.php:571
Stack trace:
#0 /var/www/emoncms/Modules/process/process_processlist.php(571): exceptions_error_handler(2, 'Division by zer...', '/var/www/emoncm...', 571, Array)
#1 [internal function]: Process_ProcessList->kwh_to_power('18', 1524471108, 10583.32236375, NULL, Object(Process))
#2 /var/www/emoncms/Modules/process/process_model.php(61): call_user_func_array(Array, Array)
#3 /var/www/emoncms/Modules/process/process_model.php(104): Process->__call('kwh_to_power', Array)
#4 /var/www/emoncms/Modules/process/process_model.php(104): Process->kwh_to_power('18', 1524471108, 10583.32236375, NULL)
#5 /var/www/emoncms/scripts/phpmqtt_input.php(281): Process->input(1524471108, '4112', '1:8,2:0.11192,3...')
#6 [internal function]: message(Object(Mosquitto\Message))
#7 /var/www/emoncms/scripts/phpmqtt_input.php(116): Mosquitto\Client->loop()
#8 {main}
2018-04-23 08:11:59.832|ERROR|phpmqtt_input.php|exception 'ErrorException' with message 'Division by zero' in /var/www/emoncms/Modules/process/process_processlist.php:571
Stack trace:
#0 /var/www/emoncms/Modules/process/process_processlist.php(571): exceptions_error_handler(2, 'Division by zer...', '/var/www/emoncm...', 571, Array)
#1 [internal function]: Process_ProcessList->kwh_to_power('18', 1524471119, 10583.32236375, NULL, Object(Process))
#2 /var/www/emoncms/Modules/process/process_model.php(61): call_user_func_array(Array, Array)
#3 /var/www/emoncms/Modules/process/process_model.php(104): Process->__call('kwh_to_power', Array)
#4 /var/www/emoncms/Modules/process/process_model.php(104): Process->kwh_to_power('18', 1524471119, 10583.32236375, NULL)
#5 /var/www/emoncms/scripts/phpmqtt_input.php(281): Process->input(1524471119, '4112', '1:8,2:0.11192,3...')
#6 [internal function]: message(Object(Mosquitto\Message))
#7 /var/www/emoncms/scripts/phpmqtt_input.php(116): Mosquitto\Client->loop()
#8 {main}
2018-04-23 08:40:03.563|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:40:05.426|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:40:58.049|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:41:00.734|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
2018-04-23 08:41:22.275|WARN|phpmqtt_input.php|Not connected, retrying connection
2018-04-23 08:41:25.282|WARN|phpmqtt_input.php|Connecting to MQTT server: Connection Accepted.: code: 0
My emonpi is running what I think is the latest software:
Server Information
Emoncms Version low-write 9.8.28 : 2018.01.27 Modules Administration : App v1.1.0 : Backup v1.1.2 : EmonHub Config v1.0.0 : Dashboard v1.1.1 : EventProcesses : Feed : Graph v1.2.0 : Input : postprocess : CoreProcess : Schedule : setup : Time : User : Visualisation : WiFi v1.0.0 Buffer loading… Writer Daemon is not running, start it at ~/scripts/feedwriter Server OS Linux 4.9.35+ Host emonpi emonpi (127.0.1.1) Date 2018-04-24 20:38:34 UTC Uptime 20:38:34 up 65 days, 3:34, 1 user, load average: 0.64, 0.45, 0.36 HTTP Server Apache/2.4.10 (Raspbian) HTTP/1.1 CGI/1.1 80 MySQL Version 5.5.57-0+deb8u1 Host localhost (127.0.0.1) Date 2018-04-24 20:38:34 (UTC 00:00) Stats Uptime: 5635188 Threads: 3 Questions: 403306 Slow queries: 0 Opens: 59 Flush tables: 1 Open tables: 51 Queries per second avg: 0.071 Redis Version 2.8.17 Host localhost:6379 (127.0.0.1) Size 116 keys (509.30K) Uptime 9 days MQTT Version 1.4.14 Host localhost:1883 (127.0.0.1) Pi CPU Temp 36.86°C Release emonSD-26Oct17 File-system Set root file-system temporarily to read-write, (default read-only) Memory RAM Used: 60.34% Total: 481.7 MB Used: 290.65 MB Free: 191.05 MB Disk Mount Stats / Used: 63.21% Total: 3.33 GB Used: 2.1 GB Free: 1.06 GB /boot Used: 36.32% Total: 59.95 MB Used: 21.77 MB Free: 38.17 MB /home/pi/data Used: 2.25% Total: 3.68 GB Used: 84.89 MB Free: 3.4 GB PHP Version 5.6.30-0+deb8u1 (Zend Version 2.6.0) Modules apache2handler : bcmath : bz2 : calendar : Core v5.6.30-0+deb8u1 : ctype : curl : date v5.6.30-0+deb8u1 : dba : dio v0.0.4RC4 : dom v20031129 : ereg : exif v1.4 : fileinfo v1.0.5 : filter v0.11.0 : ftp : gettext : hash v1.0 : iconv : json v1.3.6 : libxml : mbstring : mcrypt : mhash : mosquitto v0.3.0 : mysql v1.0 : mysqli v0.1 : openssl : pcre : PDO v1.0.4dev : pdo_mysql v1.0.2 : Phar v2.0.2 : posix : readline v5.6.30-0+deb8u1 : redis v2.2.7 : Reflection : session : shmop : SimpleXML v0.1 : soap : sockets : SPL v0.2 : standard v5.6.30-0+deb8u1 : sysvmsg : sysvsem : sysvshm : tokenizer v0.1 : wddx : xml : xmlreader v0.1 : xmlwriter v0.1 : Zend OPcache v7.0.6-devFE : zip v1.12.5 : zlib v2.0 :
Client Information
HTTP Browser Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 Screen Resolution 1920 x 1080 Window Size 1778 x 773
I’m pretty sure restarting emonhub will bring it back to life for a few days before it crashes again… Can anyone suggest avenues for further investigation? Is there any additional info I can share that would be helpful?
Thanks