Timeout with InfluxDB connection

Hey guys,

i have a small problem with connecting home assistant to an InfluxDB running on a second host. The DB is secured behind an nginx reverse proxy.
It seems that the underlying urllib timeouts sometimes, which blocks startup of home assistant. Which is strange, because the influxDB instance is perfectly accessible via command line (e.g. curl), but in HASS startup it takes three connection attempts and then the component dies and startup proceeds without the influx component. This happens everytime when i change something in the configuration (not just influx config, but every other HASS component as well. This also happens after exiting HASS without shutting it down correctly, e.g. SIGKILL. When HASS exits this abruptly, it shows an exception belonging to the multithreading algorithms, which, after some research, led me to this Stackoverflow Question, especially the answer was interesting for me.
Is ist related to the multithreading home assistant uses?

It was also interesting monitoring the communication between both hosts when these timeouts occur. The nginx on the target machine doesn’t recognize any access attempts, but the tcpdump on both machines show no SYN-ACK-Sequence but rather TCP RST packages (for a session which was not properly opened, hence the timeout).

So my question is: Could it be possible that after a forced shutdown somehow the remainings of an existing thread aren’t completely removed, but traces of the TCP connection still exist, which are somehow tried to recycle by a new thread after a fresh start? What can i do to prevent this? Let HASS take its time to correctly shutdown (which can take up to minutes, sometimes it seems to ignore the SIGTERM signal completely)?

But how does this all get together with the timeout after a config change?

I have a similar problem. My Inluxdb lives in a partially sleeping macmini. During normal operations, the database works just fine. No feeds are lost when I query them. But if my rapsbery pi HASSIO reboots, the influxDB connection is lost. I need to actively power up the macmini, then restart home assistant, and then it starts working back again. How can I avoid actively starting the server in order to get a connection?