Emoncms - REDIS service restart or flush is resetting kWh feeds to Zero

long time and many users are reporting about … and now i figure out, that a REDIS service restart will set feeds which are on “kwh” to ZERO (0)
emoncms - REDIS service restart or flush is resetting kWh feeds to Zero
any idea how this can be fixed ?

Hello @erwin this shouldn’t happen. If you flush redis the feeds should fetch their latest values from the original database. Are you using the PHPFina feed engine?

well, i have no clue why is that reason, but that fits exactly to a POWER FAILURE, on which all values from KWH are set to ZERO (there are also few topics about that issue, which is really a pain when you have (like me) around 30 calculated KWH values …

sure, data is/are PHPFina feed engine and used on Watt values, on which i use function: “Power to kWh”, and these feed values will be set to ZERO when i use the “REDIS flush”

[TrystanLea]
Hello @erwin this shouldn’t happen.
If you flush redis the feeds should fetch their latest values from the original database.
ok, that is nice, but what happen, if it doesn’T can get values from the original database ?
then it is setting the vlaues to ZERO ?. NOt sure, if that logic is fine, don’t know …
are the REDIS feed values which are pending also written after a reboot ?
can it be, that there is a logical error ?

i guess, what i also have seen, when i edit a VIRTUAL value, then it is looking like that it is doing it, but in real it is not changing the value …

wget -qO- “http://localhost/emoncms/feed/update.json?apikey=996c03da34992bdceab1ce33a631433c&id=235&value=1461

of course, a VIRTUAL value can’T be changed, i know … but only wanted to inform about that.
maybe something is destroying the database, because the FEED values can’T be written and REDIS flush is then setting the values to ZERO.

but then then a REDIS flush would also destroy almost all database values and is setting it to ZERO.

well, maybe it is possible to set anyhow to DEBUG logs so, that is visible to show whats going on ?