My Feeds page is greyed out. What should I do to fix it?
My Feeds page became greyed out attempting to assist @BrianD. What should I do to fix it?
More to the point perhaps, what checks are missing that allowed it to happen?
@glyn.hudson requested I create a new topic regarding the Feeds page problem that developed while we were investigating the Openevse problem.
Extra information: My Emoncms local information has stopped working but my Emoncms remote is still OK
That makes sense, because it’s emonHub which forwards the data to emoncms.org. My Inputs too were working - I’ve shut it down now as it is the development/testing device with the emonPi3 / emonTx6 board on a RPi 2B.
And how to repeat the problem is back in that topic.
Noted that this is the same issue as we’re discussing here Openevse Self Production feed selection - #32 by TrystanLea. Hopefully we will get to the bottom of what’s causing the issue on your system shortly @BrianD .
Ah apologies @glyn.hudson asked to split the topic up to the emoncms issue on this thread, which makes sense.
Sorry about this issue, could you let me know what you see if you type the following URL directly:
http://emonpi.local/feed/list.json
This should hopefully give us an error to work with. Once I have that error I will improve the catching of this error state so that it doesnt result in this issue in the first place, again apologies!
I managed to reproduce this issue, it was caused by the source feed of a virtual feed being deleted. I have now added a fix for this and pushed to latest master and stable branches, release v11.19.3. Let me know if this fixes the issue for you both @BrianD @Robert.Wall
For me, not true. I had only one Feed, V1, and I only deleted it AFTER the problem surfaced - which was not immediately after I changed the Virtual feed from Source Feed = V1 as op.1 to absolute value = 0 as op.1 and + source feed as op.2, then moved back to the Inputs page. Returning to the Feeds page, it refused to load.
@TrystanLea - I think you’re looking for a missing or illegal value in the maths. OK, it should be intuitive to use Source Feed as the first operation but equally starting with zero and adding to it should not crash the page, which is what appears to have happened.
Updating and opening the Feeds page generated this error:
- probably because had I deleted all process steps on the Inputs page inside emonCMS and the Feed files (unused anyway) outside of emonCMS because I had no other way to attempt a recovery.
then when I try to create it:
You’re relying on a list somewhere instead of looking for the files themselves? How is the list corrected?
(There are NO process steps at all on the Inputs page, so it appears a method of updating the stored list is needed.)
The way for me to recover is clear - rewrite the SD card and reload the emonPi3 software. This clearly isn’t viable if the same happens to another user, because the corrupted lists/tables will be part of the backup and will get reloaded and restore the fault as it was.
Nice to see the new error reporting addition in the latest version working there at least that gives me something to work with. Thanks @Robert.Wall !
The response is ‘False’
Just fixed this @Robert.Wall , latest version skips the abs function if the value is null, you are welcome to update again.
Is that what you see in the same error window as @Robert.Wall? Can you try logging out and back in again, a session issue is usually the reason for a False response but I may be off the mark there..
Update done - a pack of lies revealed! The Feeds which I deleted via the Feeds page before I deleted their files have reappeared on the Feeds page. ![]()
But only a new Feed created today has a pair of files in /var/opt/emoncms/phpfina/
pi@emonpi:/var/opt/emoncms/phpfina $ ls
10.dat 10.meta
So a new problem surfaces: I can write and add process steps to use those feeds for which no file exists - and hasn’t been (re-)created. Now the question: If it delete the just-added process steps and then delete the Feeds via the Feeds page, will this clean the system up? Nope:
But I appear to be able to delete the no-files Feeds via the Feeds page:
And they’re gone - even though thee wasn’t a physical file to delete in the first place, and taken the process steps it refused to delete from the Inputs page with them, so it happens to have done what the “Delete:” note suggests the user does.
So by a circuitous route, it appears to have cleaned everything up.
My feeling is, somebody frightened of losing their data would never attempt these steps, so can I suggest maybe a stand-alone task to check everything for consistency and report and invite/allow the user to delete or correct anomalies?
(And apologies for the pair of horns and forked tail I appear to have grown
- better I find the bugs than a paying customer.)
This sounds like an issue caused by the redis cache becoming out of sync with the mysql and feeds on disk. We have had a few issues over the years with this but they have been rare and difficult to track down. I got claude on the case as it wasn’t immediately obvious and it first found an interesting condition that can cause this issue and then developed the fix. It also wrote a test to replicate the issue pre-fix and confirmed that the fix does indeed fix the issue.
The explanation in simple terms:
What went wrong
Emoncms keeps a quick-access copy of the feed list in Redis alongside the main database. When a feed is deleted while an input is still writing to it, the input’s write can land a split second after the delete. That recreates a partial copy of the deleted feed in Redis. The feed is gone from the database and disk, but Redis still thinks part of it exists, and that can cause errors when the feed list loads or data is posted. Deleting lots of feeds at once while inputs are running makes this much more likely. The bug has been there a long time but is rarely hit.
The fix
Emoncms now checks whether the Redis copy of a feed is complete. If it isn’t, Emoncms checks the database and removes the leftover if the feed no longer exists. Deletes also no longer depend on the Redis copy being correct. Once you update, the leftovers should be cleaned up automatically the next time the feed list loads.
Fix available in v11.19.6 Fix feed redis cache getting out of sync with mysql on delete · emoncms/emoncms@4436521 · GitHub
Are you & Claude talking about the original problem - which was getting the wrong thing as 1st operation in a Virtual Feed, or getting the database/cache/whatever straightened out after I got it screwed up trying to figure out if there was a way to clear the original problem?
The original problem was caused by the abs function returning an error when the value from the previous process or absence of process was NULL, that was fixed earlier above Fix null error with abs process · emoncms/emoncms@80c7c02 · GitHub
It really is returning false then ! Can you check the emoncms log on the admin page?







