Influx 2.0 OSS gives error http: Accept error: too many open files; retrying in 1s

I have a system (Influx 2.0 R1) running on Ubuntu. I got this message after my script was writing data in the database:

info http: Accept error: accept tcp [::]:8086: accept4: too many open files; retrying in 1s

This error kept repeating itself, did not recover.

After stopping the service, restarting I got also this error:

info Write failed {“log_id”: “0Q5XyOzl000”, “service”: “storage-engine”, “shard”: 160, “error”: “[shard 160] open
/home/ahannula/.influxdbv2/engine/data/c0ea970e132721f3/autogen/160/index/0/MANIFEST: too many open files”}

Why is this? Is my system writing too “fast” and the system cannot cope with that, is it a configuration problem or something else? What should I do in order to avoid this error… thanks in advance!

Hi. Same problem here and no idea about how to solve it. Did you find a solution?

Yes. The problem was solved by setting a higher value for ulimit. In my case, “ulimit -n” gave 1024 (max open files) and after setting it to 65535 the problem was gone.

I overlooked this solution before because of a misunderstanding: ulimit returns unlimited, and of course I assumed there is… no limit in open files. Poor interface and my mistake for not reading how it works.

Launching ulimit -n it returns 1024, and that means it is not set high enough.

Thank you!

Hi, I have been facing the same error since yesterday in my InfluxDB OSS 2.0 setup with modbus plugin in Telegraf 1.19. How do we update the ulimit value in the influx?
I get this error when I try to write 65536 to ulimit.
“bash: ulimit: open files: cannot modify limit: Operation not permitted”