Too many file open issue

Hi,
We are facing**too many file open issue**on Production.We are using mattermost 7+ version. Almost 400+ users login on daily bases for internal organisation communication purpose. We have gradually increase file limit for it and now it is 17K but it reaches in 2, 3 days and we have to restart server for it. We have also done debugging but did not find helpful for it. Can you identify the root cause and solution of it.
I will be thank for it

Hi @manzoor77 ,

on linux systems, everything is a file, including a TCP connection, so most likely, you do have lots of connections also.
Can you monitor the output of lsof -n -u mattermost on your Mattermost server? It would also be interesting to see the amount of connections in their different states on your Mattermost server.

Can you also run this command to check it? As an example on my test system, I do have 1514 established connections and 22 in the listening state:

# lsof -n -i | sed -n 's/^.*(\(.*\))$/\1/p' | sort | uniq -c | sort -rn
   1514 ESTABLISHED
     22 LISTEN