Sorry fo rthe delay. That first message with the OOM is the issue as far as i can see. Influx can't cope with the amount of data you're trying to write and runs out of memory. When this happens the service will restart but you will need to wait for it to go through the whole start up process which can take a while. Once Influx has caught up you should then be able to connect to the CLI as normal. If Influx carries on trying to insert the data once back online, it will only OOM again.
I think the nifi errors are related to the OOM. If the influx service is still loading up then you won't be able to send data to it.
1) Switching the index version to TSI1 - this should alleviate some of the memory issues (if you're using SSD)
2) breaking downt the data you want to import into smaller batches. There is an influx bench marking tool that could help [InfluxDB INCH](https://github.com/influxdata/inch
) - It might be worth testing inserting your data with that to get a good idea of the maxmium you could send into your Influx instance.
Sorry if you've already read these, but this should help
[Schema and Design](https://docs.influxdata.com/influxdb/v1.7/concepts/schema_and_data_layout/
Hope that helps in some way.