Special case: database is locked/busy

It may happen that the 'database is locked/busy' warning appears when storing new sensor values.

This is not a problem. No data will be lost.

This is because the API is multithreaded, but the SQLite engine is not. If there are too many write requests) at once, the engine will temporarily lock that database for further writes.

The client removes the data from the send buffer only after it is acknowledged. Until this happens, the data is always re-sent on the next write.

If the data has been saved in the meantime, a warning 'UNIQUE constraint failed: MxChartDBxxx.ts' is written to the log file. This message may be useful for analysis.

The maximum number of repetitions can be defined in the constants.js file (parameter buffer_max_rows, default: 20).

To avoid the 'database is locked/busy' events, you can