Too many open files | Change shard length?

I have influxdb running as a Docker container on my Unraid instance.
There is some power monitoring data being archived that i then visualize with Grafana.

Recently Influx is failing and the logs are scrolling “too many open files.”
I have beat the ulimit -n topic to death applying it s an argument for my container and also trying to apply it to the host. Nothing seems to work.

I am thinking now that maybe my setup is wrong and it shouldn’t be trying to open all those files.There is around 2 years of data in mybucket and i would like to keep it running for the foreseeable future.

Is there database cleanup or an archiving process i am missing?
I just read about shards so perhaps I need to set my shards to a longer duration. (However that is done)

Hello @Visible-Stea1th,
Have you tried increasing the ulimit?

docker run --ulimit nofile=65536:65536 influxdb

I have an argument added to the start of the influxdb container that sets the ulimit.

This is from the cli of the container

influx cli ulimit