Influxdb persistence: enhance connection handling