Running slowly and not responding

I have had openhab running on my raspberr pi 2 for a few weeks now but over the last couple of days I’ve been having some unexpected issues.

On Saturday and Sunday morning I noticed that my bedside lamp hadn’t turned on at the set time. I tried to manually turn on the lamp by logging into the android app but the site map wouldn’t load so I had to ssh into the pi to restart the service.

This non responsiveness has happened a fair few times over the last few days, I noticed this today when I waliked into my garage and the pir sensor didn’t turn the lights on (ran by a rule).

Can anyone please assist with debugging this issue as I do not know where to look.

Debugging this starts with setting up a bunch of logs so you can trace things. See [here] (Simple Timer switch rule help) for a detailed logback.xml example.

Then start by eliminating the obvious. If you reboot the pi2 and restart OH, does the problem persist or go away (at least for a while).

If the problem returns on reboot/restart more or less at the same level as now, I would look for configuration/communications issues. e.g. if you are a zwave protocol user, the zwave.log in the configuration linked above.

You should also examine your error.log and openhab.log for clues timestamped around the “non-occurrence” of your expected event. You are looking to verify that the triggering events actually occurred and that the consequent commands were sent and at what times.

Example: if the trigger and consequence command appear suitably timestamp separated, but the actual physical manifestation of the consequence command is delayed, the comm protocol and/or devices looks suspect. Possibly your battery level in a remote device is getting weak enough that some transmissions are lost and/or require multiple retries, thus involving retry-delay loops.

If the problem goes away and then gradually returns (or more commonly, goes away and then returns subtly until it gets “bad enough” that you notice it), the most likely place to look is something in your rules setup/operating environment which is generating error/warning messages. These may or may not be related to the symptomatic devices. The ongoing generation of error messages tends to generate garbage-collection type problems which leads to symptoms like slowdowns etc. Not the only possible cause, but high on the list.