Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upToo Many Open Files every once a day #2931
Comments
This comment has been minimized.
This comment has been minimized.
|
Practically, Prometheus just needs a good amount of file descriptors to do its work and simply raising your file descriptor limit for the process should solve the issue. There's no significant cost to raising the limit. |
This comment has been minimized.
This comment has been minimized.
|
can we calculate the proper amount of file descriptor by metrics count? or just do a trial? |
This comment has been minimized.
This comment has been minimized.
|
@alileza It largely depends on the number of targets you have and the scrape-interval. It requires the fds for the HTTP requests and for the database. If you have too many open-requests due to small scrape-interval or large number of targets, you can easily exhaust the default 1024 limit. You could start with 4096 and increase it if you still see issues. Closing this as it is not a Prometheus bug, please feel free to reopen if you think otherwise. |
gouthamve
closed this
Jul 11, 2017
This comment has been minimized.
This comment has been minimized.
|
@gouthamve perfect, thank you ! |
This comment has been minimized.
This comment has been minimized.
|
Just for the record: In all but the most extreme use cases, the vast majority of open fd's are created by leveldb. I guess those go up under heavier indexing load. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
alileza commentedJul 11, 2017
•
edited
Every once a day my prometheus server crash because too many open files
Linux 4.4.0-83-generic x86_64
prometheus, version 1.5.0 (branch: master, revision: d840f2c)
build user: root@a04ed5b536e3
build date: 20170123-13:56:24
go version: go1.7.4
Alertmanager version:
alertmanager, version 0.5.1 (branch: master, revision: 0ea1cac51e6a620ec09d053f0484b97932b5c902)
build user: root@fb407787b8bf
build date: 20161125-08:14:40
go version: go1.7.3
Prometheus configuration file: