ioBroker.admin: objects.jsonl slowly blowing up with growing debounce hash
Describe the bug
Since a few days, my objects.jsonl
keeps growing and growing whenever I reconfigure parameters, causing adapters to use hundreds of megabytes of RAM.
Checking, I find:
# grep example_state objects.jsonl | tail -n1 | less
{"k":"0_userdata.0.example_state","v":{"_id":"0_userdata.0.example_state","type":"state","common":{"name":"Example state","role":"indicator","def":false,"type":"boolean","custom":{"history.0":{"enabled":true,"aliasId":"","debounceTime":0,"blockTime":500,"changesOnly":true,"changesRelogInterval":0,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":0,"customRetentionDuration":365,"maxLength":5,"enableDebugLogs":false,"debounce":[0,[[0,[0,[0,[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"],[0,"10000"]
This hash appears to keep growing whenever I reconfigure history settings for the data point.
To Reproduce
Steps to reproduce the behavior:
Sadly, I am not fully sure whether this can be triggered as easily in any configuration… For me, it happens on each config change, i.e.:
- Enable history adapter.
- Configure history adapter for any data point.
- Adapt parameters in memory (
maxLength
) or debounce settings. - Save.
object.jsonl
seems to grow, hash never shrinks for me.
Expected behavior
Hash to be trimmed at some point…
Screenshots & Logfiles
Maybe this is related to some unexpected configuration on my end? I can provide config if asked what to look for.
Versions:
- Adapter version: 3.0.1
- JS-Controller version: 5.0.17 (in official Docker container)
- Node version: v18.19.0
- Operating system: Official Docker container (Debian 12)
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 23
Commits related to this issue
- started working on not saving 'different' unchanged values for json c… (#2365) …onfig multi edit mode - closes #2359 — committed to ioBroker/ioBroker.admin by foxriver76 5 months ago
- do not crash when using the dropdown on multi edit custom settings - see https://github.com/ioBroker/ioBroker.admin/issues/2359#issuecomment-1944144506 — committed to ioBroker/ioBroker.admin by foxriver76 5 months ago
- do not crash when using the dropdown on multi edit custom settings (#2368) - see https://github.com/ioBroker/ioBroker.admin/issues/2359#issuecomment-1944144506 — committed to ioBroker/ioBroker.admin by foxriver76 5 months ago
I will find all affected by looking for e.g
"debounce":[
in objects.jsonl and the same for all other keys. But I won’t search/replace it in objects.json, even this would work after stopping iobroker. Instead I will edit all in admin object editor. I’m happy that the cause is fixed now and then it is worth to fix the settings.Found 52 wrong debounce, 25 wrong enabled and 9 wrong changesRelogInterval: So, it isn’t that much effort to fix it manually.
The fix is a general approach and not specific to one of the values
6.13.21 should fix it.
I will have a look tomorrow @olifre
After talking about it it seems with older admin versions we displayed
different
greyed out and only saved changes to such fields if user wrote something in it explicitly. Probably this is the best solution.Thanks, I think the info with the wrench might help to reproduce