influxdata / influxdb-java

Java client for InfluxDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory consumption when retrieving huge result data

fenjen opened this issue · comments

When querying the InfluxDB for large results, the okio client seems to hold the entire response in local byte arrays.

I'm querying data with com.influxdb.client.QueryApi.query(String, BiConsumer<Cancellable, FluxRecord>, Consumer<? super Throwable>, Runnable). The result data is huge, but consumed efficiently. Yet my JVM stops frequently because the okio client seems to hold references to the entire response. The heap dump analyzer shows variables that contain the whole original CSV data.

See attached image for details.
okio-heap-consumption