Failed to connect to influx

I have used influx for a long time, but today, I can’t access it. The error hint is below.
$ influx -host
Failed to connect to Get dial tcp connect: connection refused
Please check your connection settings and ensure ‘influxd’ is running.

I tried to reboot the influxd server but the same issue.

I used command sudo systemctl status influxdb to check its status, it is active.

I used command influxd config | grep -i index.
it shows fatal error: runtime: out of memory
Could you please helpme to resolve this issue?

I run in centos, and I found influxd almost occupied CPU(high to 99.9%), I don’t have any thread access influxd


whats the ouput from the influx logs?

Your system ran out of memory according to your first post, which means if its restarted it will be going through and opening all the databases/shards and getting ready to receive data. This can take a while depending on the size of your databases. Until that finishes you will get the tcp error

Rebooting the system will have restarted this process.

How can I get the influx log?

On Ubuntu I’d use

sudo journalctl -fu influxdb


sudo tail -f /var/log/influxdb/influxdb.log (log name might be influx.log)

The first one usually works though. You should be able to see whats going on from there.

Thank you philb, the influx recovered automatically while I did nothing. Do you know if there is any reason for this, I am afraid this may happen again in the furture.