# Max files too low

**URL:** <https://community.openpbs.org/t/max-files-too-low/2682>\
**Category:** Users/Site Administrators\
**Created:** [July 1, 2021, 2:10pm UTC](https://community.openpbs.org/t/max-files-too-low/2682 "2021-07-01T14:10:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![boboshaq](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@boboshaq](https://community.openpbs.org/u/boboshaq)\
**Post date:** [July 1, 2021, 2:10pm UTC](https://community.openpbs.org/t/max-files-too-low/2682/1 "2021-07-01T14:10:42Z")

</div>

Hi  
Problem:

> Max files too low - you may want to increase it

How to increase it?

I read this information but it tells me nothing:

> Max files allowed = %ld  
> Logs the nfiles currently configured.  
> Log level: PBSEVENT\_DEBUG | PBSEVENT\_DEBUG2  
> Max files too low - you may want to increase it  
> If nfiles is \<1024, the pbs\_comm daemon emits the message. If nfiles configured is \<100, the startup aborts.  
> Usually nfiles must be configured to allow the number of connections (usually the number of MoMs) the  
> pbs\_comm process is going to handle.

---

<div class="post-metadata">

**Author:** ![boboshaq](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@boboshaq](https://community.openpbs.org/u/boboshaq)\
**Post date:** [July 6, 2021, 7:58am UTC](https://community.openpbs.org/t/max-files-too-low/2682/2 "2021-07-06T07:58:47Z")

</div>

Anyone can remark in this topic?

---

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://community.openpbs.org/u/roy)\
**Post date:** [July 6, 2021, 10:16pm UTC](https://community.openpbs.org/t/max-files-too-low/2682/3 "2021-07-06T22:16:50Z")

</div>

Hi, I am interested in an answer as well, please explain what is this configuration effects, how to change it and when.

Thanks,  
Roy

---

<div class="post-metadata">

**Author:** ![subhasisb](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/subhasisb/32/12_2.png) [@subhasisb](https://community.openpbs.org/u/subhasisb)\
**Post date:** [July 7, 2021, 3:26am UTC](https://community.openpbs.org/t/max-files-too-low/2682/4 "2021-07-07T03:26:01Z")

</div>

u can increase the nfiles limit using ulimit command before starting pbs\_comm, or u can make a permanent change using systemctl… see this page for help: [How to Increase Number of Open Files Limit in Linux](https://www.tecmint.com/increase-set-open-file-limits-in-linux/)

---

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://community.openpbs.org/u/roy)\
**Post date:** [July 7, 2021, 4:06am UTC](https://community.openpbs.org/t/max-files-too-low/2682/5 "2021-07-07T04:06:05Z")

</div>

Thanks @subhasisb , can you please explain what are the instructions as to decide which value should we set it to?

Is it based on number of Moms? Number of jobs? etc.

Thanks,  
Roy

---

<div class="post-metadata">

**Author:** ![subhasisb](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/subhasisb/32/12_2.png) [@subhasisb](https://community.openpbs.org/u/subhasisb)\
**Post date:** [July 7, 2021, 4:46am UTC](https://community.openpbs.org/t/max-files-too-low/2682/6 "2021-07-07T04:46:10Z")

</div>

pbs\_comm is a broker - it is the component that mediates messages between the server/mom and between moms. It consumes one file descriptor per tcp connection. These endpoints (server, moms) that connect to the same pbs\_comm consumes one fd, each. So, the number of moms primarily dictate the value of nfiles u need for comm.

Of course, some fds are already consumed by the pbs\_comm process in libraries, configuration files etc (we can keep aside a hundred for that). Thus, if you have 2000 moms, then you might want to set nfiles to something like 2500…

---

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://community.openpbs.org/u/roy)\
**Post date:** [July 7, 2021, 3:59pm UTC](https://community.openpbs.org/t/max-files-too-low/2682/7 "2021-07-07T15:59:25Z")

</div>

Thank you @subhasisb thats very helpful information

---

<div class="post-metadata">

**Author:** ![zhangyi2012](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/zhangyi2012/32/456_2.png) [@zhangyi2012](https://community.openpbs.org/u/zhangyi2012)\
**Post date:** [January 7, 2022, 11:05am UTC](https://community.openpbs.org/t/max-files-too-low/2682/8 "2022-01-07T11:05:30Z")

</div>

I also encountered the problem of “Max files allowed = 1024, Max files too low - you may want to increase it”  
All of the following operations are performed by root

My steps are as follows:  
(1)The default ulimit -n of my OS is 1024.  
So when the PBS service is started, PBS\_mom, pbs\_sched,pbs\_serveres all prompt as follows (no pbs\_comm):

```
			01/07/2022 18:01:16;0d80;pbs_mom;TPP;pbs_mom(Main Thread);Max files allowed = 1024
			01/07/2022 18:01:16;0c06;pbs_mom;TPP;pbs_mom(Main Thread);Max files too low - you may want to increase it.
			01/07/2022 18:01:36;0d80;pbs_sched;TPP;pbs_sched(Main Thread);Max files allowed = 1024
			01/07/2022 18:01:36;0c06;pbs_sched;TPP;pbs_sched(Main Thread);Max files too low - you may want to increase it.
			01/07/2022 18:02:02;0d80;Server@cf-poc-master;TPP;Server@cf-poc-master(Main Thread);Max files allowed = 1024
			01/07/2022 18:02:02;0c06;Server@cf-poc-master;TPP;Server@cf-poc-master(Main Thread);Max files too low - you may want to increase it.

```

(2)Then I change ulimit -n 102400 in /etc/security/limits.conf:  
root soft nofile 102400  
root hard nofile 102400

(3)Then restart the machine and confirm that the modification takes effect  
command “ulimit -n” output 102400

But, when PBS service starts again, pbs\_mom, pbs\_sched and pbs\_server(except pbs\_comm) still report warning mean that 1024 too low like above,  
then I try command “ulimit -n 102400” in the current login shell, it still no effect

Why?

Should I modify ulimit in the pbs’s systemd service conf file,or by systemctl, or there maybe some conf in pbs overwrite the OS config?

Looking forward to your reply, thank you!
