InfluxDB is giving a 502 frequently

I have a Influx container, that gives me a 502 error once a day, but at random time.

I checked the logs, but I don’t see any errors.

When I try to execute the query:

docker exec -it $(docker ps -q --filter name=influxdb) influx -username admin -password '***' -format=csv -database=sun -precision=rfc3339 -execute "select * from measures where id='99811';"


Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: EOF
Please check your connection settings and ensure 'influxd' is running.

Which seems to says that Influx is not running

When I run htop inside the container, I can see 12 threads named “influxd”.

I have space on my hdd, I have free memory.

When I restart the container, it will work again.

As I have no experience with InfluxDB, I don’t really know what is the next step to debug it.

What can I do to debug influx ?