Influx DB - Batch could not be sent. Data will be lost java.lang.RuntimeException: {"error":"timeout"}

Hi there,
Im getting this error from Influx DB:

Batch could not be sent. Data will be lost
java.lang.RuntimeException: {"error":"timeout"}

I’m on openhab 2.2… any ideas?
thanks!

MM

Hi,

Did this error appear all of a sudden, not having been there before?
I had this appearing shortly before my SD card died.

Kurt

no, have this since a while…

Hi, did you find a solution for this? My InfluxDB is running on a separate Server, so the sd card cannot be the issue. The error occurs about every 10 to 20 minutes on my Openhabian. But there is data saved to the InfluxDB. Propably only fragments of the data cannot be stored. On the InfluxDB side I have no error logs.

Edit: I found a few items that reported a lot of values to the database. (Probably every few miliseconds) I’ve now changes those items from everyChange to everyMinute. With this configuration the error is gone. I guess there were just too many values every second to be sent to the server.

I seem to have run into this problem after moving the influxdb to a different server. How did you identify the most verbose items?

thanks in advance,
Daniel

I’m not really sure anymore, but I think I made a query directly on the InfluxDB to find out which items are sending the most values.

I have just migrated OH2 from a Pi3B to a Pi4, including all influxdb data, grafana, mosquitto and other programs.
After the migration I noticed some InfluxDB timeout errors in the openhab log:

2020-03-25 11:08:45.945 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {"error":"timeout"}

        at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[influxdb-java-2.2.jar:?]
        at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[retrofit-1.9.0.jar:?]
        at org.influxdb.impl.$Proxy171.writePoints(Unknown Source) ~[?:?]
        at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[influxdb-java-2.2.jar:?]
        at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [influxdb-java-2.2.jar:?]
        at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [influxdb-java-2.2.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2020-03-25 11:50:16.245 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {"error":"timeout"}

        at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[influxdb-java-2.2.jar:?]
        at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[retrofit-1.9.0.jar:?]
        at org.influxdb.impl.$Proxy171.writePoints(Unknown Source) ~[?:?]
        at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[influxdb-java-2.2.jar:?]
        at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [influxdb-java-2.2.jar:?]
        at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [influxdb-java-2.2.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

These errors appear about 5-6 times per day.

The SD card is a 128 GB brand new card. There are no other errors in /var/log/messages.
The output of dmesg shows an error related to a file system cookie:

[   15.348610] FS-Cache: Duplicate cookie detected
[   15.348628] FS-Cache: O-cookie c=(ptrval) [p=(ptrval) fl=222 nc=0 na=1]
[   15.348638] FS-Cache: O-cookie d=(ptrval) n=(ptrval)
[   15.348649] FS-Cache: O-key=[8] '020001bd0a0000fd'
[   15.348684] FS-Cache: N-cookie c=(ptrval) [p=(ptrval) fl=2 nc=0 na=1]
[   15.348693] FS-Cache: N-cookie d=(ptrval) n=(ptrval)
[   15.348702] FS-Cache: N-key=[8] '020001bd0a0000fd'

Is there any solution for this?

Thanks,
Cristian