Skip to content
Advertisement

InfluxDBIOException: java.net.SocketTimeoutException: timeout

I’m using Influx Db java wrapper and adding data in influx db for every 5 seconds with a retention policy of 30 days.

When I’m trying to query the data by sending multiple requests, the timeout exception is seen. Once I clear the db data , the response is received properly.

JavaScript

The exception cause points to this line val results = influxDB.query(q)

JavaScript

All the field values are of Long Type and have values like 2721976000.

Below is response from explain statement of the above query.

JavaScript

I could not find the solution to solve the exception , in the java console logs the response is received properly. Any pointers whether to look at query optimization or cause of exception would be helpful.

Advertisement

Answer

I changed the default timeout of OKHttpClient and the exceptions were not thrown within the particular duration. Missed it earlier as I had passed a different instance of DB.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement