Iotawatt restarting every 38 seconds

I don’t see anything with the setup that should cause the restarts. What I do see, and what you described, is that there was a problem detected with the current log and it was deleted. Given that your unit has been in service for 4 1/2 years, it’s quite possible that you SD card is failing. I would advise replacing it.

When you copy the contents of the old card (if you can) omit the current log /iotawatt/iotalog.log, and retain the history log /iotawatt/histlog.log. After restart with the new card, start the Emoncms uploader. If the restarts continue, delete both logs using the browser URL

http://iotawatt.local/command?deletelog=both