influxdata / influxdata/influxdb-java

How to increase the ping check period?

Aperta
#722 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.2k
Fork
469
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I've a Spring application running InfluxDB communication. On the logs of application I can see the ping Influx connection check periodically by follow log:

```
2021-01-26 14:02:31,633 INFO [http-nio-80-exec-8] class:OkHttpClient, --> GET http://influxdb.intranet/ping
2021-01-26 14:02:31,633 INFO [http-nio-80-exec-8] class:OkHttpClient, --> END GET
2021-01-26 14:02:31,637 INFO [http-nio-80-exec-8] class:OkHttpClient, <-- 204 https://influxdb.intranet/ping (3ms)
2021-01-26 14:02:31,637 INFO [http-nio-80-exec-8] class:OkHttpClient, server: nginx/1.13.0
2021-01-26 14:02:31,637 INFO [http-nio-80-exec-8] class:OkHttpClient, date: Tue, 26 Jan 2021 17:02:31 GMT
2021-01-26 14:02:31,637 INFO [http-nio-80-exec-8] class:OkHttpClient, x-influxdb-version: relay
2021-01-26 14:02:31,637 INFO [http-nio-80-exec-8] class:OkHttpClient, <-- END HTTP
```
This log check is flooding my log console and I use the connection InfluxDB 1x/min so I don't need the ping check with short period. Besides that, the threads are execute by series and this check is delayed other jobs. There are a way to increase the ping check connection period time?

Bean configuration:
```
@Bean(name = "influxDBConn")
public InfluxDB influxDB() {
try {
InfluxDB influxDB = InfluxDBFactory.connect(this.influxUri, this.influxUsername, this.influxPassword);
influxDB.setLogLevel(InfluxDB.LogLevel.FULL);
Pong response = influxDB.ping();

if (response.getVersion().equalsIgnoreCase("unknown")) {
LOGGER.error("**connectInfluxDB: Error pinging server.");
throw new RuntimeException("Error pinging InfluxDB sever");
} else {
LOGGER.info("InfluxDB ping: {}", influxDB.ping());
}

return influxDB;
} catch (InfluxDBIOException e) {
LOGGER.info("M=influxDB, Msg=Error to create InfluxDB connection bean. Error: " + e.getMessage());
} catch (Exception e) {
e.printStackTrace();
}

return null;
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dalla configurazione del bean nell’issue e segui InfluxDBFactory.connect e le chiamate ping per individuare quale componente esegue le richieste ricorrenti a /ping. L’issue non indica alcun file del repository né alcun test; il lavoro è completo quando si determina se il periodo è configurabile e si documenta o si testa l’impostazione supportata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
databases
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.