-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How often is data written to DB, how up-to-date should the data in the db be ? #298
Comments
This depends on your settings. If you have specified a nukber for the "datapoint buffering" then the adapter collects these number of data per datapoint and write then in bulk. If you use 0 there aka "write directly" then the data are written directly which is more load for the DB. if something of this is not working please provide a debug log |
I have german version, so i assume this is the setting "Maximale Anzahl von im RAM gespeicherten Werten" for each datapoint? Have standard value 10 in there. |
Log: Admin - Expertmode - Instances - expand sql.0 instance - set Loglevel to "debug" |
Log attached. Did use „iobroker stop“ at 09:14 to stop iobroker and did restart approximately 2 min. later. The data comes from MobileAlerts, a system to collect weather data. This system fetches data every 7 min. which works very stable. Thanks for reviewing ! |
I see a 9:13 stopping and "starting sql.0" in the log ... So timewise that all do not reallymtch to what you wrote. Please lets start easy: Start the sql adapter with enabled debug, let it run for 22 mins (so that your weather data are 3 times or such in the "ram"), then just stop the instance, not the whole iobroker. When this is ok then we need to check for the "host stop". Pleasde also run "iob fix" and do a reboot before all next steps |
Ok, next trial.... 13:18 stop SQL adapter new data fetched from mobile alerts on 13:21 / 13:28 / 13:35 / 13:42 13:47 stop SQL adapter copied log and did start SQL adapter again. Did not do "iob fix" as i have no idea what that is and did see in a quick search that some people had trouble to get iobroker running after doing that... |
Sorry but this can not be because it is exactly therefor to do the system relevant "setup" of iobroker in a linux system and registers the services and correctly file system permissionsnand other stuff. WHhere you found that "iob fix" caused issues? Would love to see that ... |
as said, did not really read thouroghly through it and it is on my todo list: https://forum.iobroker.net/topic/20212/diskussion-zum-neuen-installation-fixer/243?lang=en-GB |
The post is from 2019 as the fixer was just added to the system, so honestly 1000% outdated ;-) |
so, now i did I am checking the data with the ID 5 (randomly picked) Let's see if this data is something which gives a hint. |
It seems to me as if the values within IOBroker are not immediately stored into the mySQL database.
I use MobileAlerts to collect weatherdata. The new data is visible in the MobileAlerts-Adapter. Then it needs 5 minutes until this value is stored in the mysql-database.
Is this per design?
When i restart or shutdown the adapter or complete IOBroker, then the values pending are not written into the mysql-database.
Describe the solution you'd like
First of all clarification if that behaviour is correct.
If yes, then i would like to have the pending data written to the DB when the system shuts down, if possible.
Describe alternatives you've considered
none
The text was updated successfully, but these errors were encountered: