# Too many file open issue

**URL:** <https://forum.mattermost.com/t/too-many-file-open-issue/15107>\
**Category:** Troubleshooting\
**Created:** [February 16, 2023, 6:13am UTC](https://forum.mattermost.com/t/too-many-file-open-issue/15107 "2023-02-16T06:13:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manzoor77](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/manzoor77/32/5894_2.png) [@manzoor77](https://forum.mattermost.com/u/manzoor77)\
**Post date:** [February 16, 2023, 6:13am UTC](https://forum.mattermost.com/t/too-many-file-open-issue/15107/1 "2023-02-16T06:13:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [February 23, 2023, 4:15pm UTC](https://forum.mattermost.com/t/too-many-file-open-issue/15107/2 "2023-02-23T16:15:45Z")

</div>

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:

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

```
