Continuing the discussion from Disable OpenHab & Lightwave RF?:
Something odd is going on with my emonPi but I am not sure how to debug it. I thought it may be related to Openhab, Lightwave RF and Java but now I am not sure.
Overall things seem very slow. Slow to login, slow for web pages to load, etc. I’ve rebooted via sudo reboot
and via the side switch (5…4…3…2…1… shutdown).
When I login via SSH, the emonPi is very, very slow. It takes ~30 to 45 seconds to respond with a pi@emonpi:~ $
prompt. The emonPi is connected via Ethernet with the USB EdiMax WiFi unplugged.
The df -h seems to return good numbers:
pi@emonpi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.4G 1.8G 1.5G 56% /
devtmpfs 483M 0 483M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 6.6M 480M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 487M 0 487M 0% /sys/fs/cgroup
tmpfs 40M 0 40M 0% /var/lib/openhab
/dev/mmcblk0p1 60M 21M 40M 35% /boot
tmpfs 1.0M 0 1.0M 0% /var/lib/dhcp
tmpfs 1.0M 4.0K 1020K 1% /var/lib/dhcpcd5
tmpfs 50M 3.8M 47M 8% /var/log
tmpfs 30M 12K 30M 1% /tmp
/dev/mmcblk0p3 3.8G 716M 2.9G 20% /home/pi/data
/dev/sda1 59G 52M 56G 1% /mnt/usb
pi@emonpi:~ $
Here is the Server Info web page:
I found this error in the syslog file but the redis-server log file was created and it does have info. So I am not sure if I should worry about the error.
Sep 7 11:35:24 emonpi redis-server[778]: *** FATAL CONFIG FILE ERROR ***
Sep 7 11:35:24 emonpi redis-server[778]: Reading the configuration file, at line 103
Sep 7 11:35:24 emonpi redis-server[778]: >>> 'logfile /var/log/redis/redis-server.log'
Sep 7 11:35:24 emonpi redis-server[778]: Can't open the log file: Permission denied
Sep 7 11:35:24 emonpi systemd[1]: redis-server.service: control process exited, code=exited status=1
Sep 7 11:35:24 emonpi systemd[1]: Failed to start Advanced key-value store.
Sep 7 11:35:24 emonpi systemd[1]: Unit redis-server.service entered failed state.
...
Sep 7 11:35:24 emonpi systemd[1]: redis-server.service holdoff time over, scheduling restart.
Sep 7 11:35:24 emonpi systemd[1]: Stopping Advanced key-value store...
here is the redis-server file:
[1296] 07 Sep 21:29:23.140 # User requested shutdown...
[1296] 07 Sep 21:29:23.140 * Removing the pid file.
[1296] 07 Sep 21:29:23.141 # Redis is now ready to exit, bye bye...
[17402] 07 Sep 21:29:23.209 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
[17402] 07 Sep 21:29:23.210 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
[17402] 07 Sep 21:29:23.210 # Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
[17402] 07 Sep 21:29:23.211 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
_.-`` `. `_. ''-._ Redis 2.8.17 (00000000/0) 32 bit
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 17402
[17402] 07 Sep 21:29:23.213 # Server started, Redis version 2.8.17
[17402] 07 Sep 21:29:23.214 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[17402] 07 Sep 21:29:23.215 * The server is now ready to accept connections on port 6379
I dont know what redis does as part of the emon system so I decided not to make the changes suggested in the redis-server file.
Your thoughts and ideas would be appeciated!