Ubuntu “Too many open files”

date
Mar 29, 2022
slug
tip-ubuntu-too-many-open-files
status
Published
summary
小技巧 increase number of open files
tags
tip
type
Post
URL

Problem & Summary

notion image

Solution

# ubuntu increase open file
# Check # of current open files
lsof | wc -l

# check current system limit
ulimit -n

### now fix

vi /etc/pam.d/common-session
# append this line to the end
session required pam_limits.so

vi /etc/security/limits.conf
# append the following to the end
* - nofile 131072
root - nofile 131072

# then reboot

Screenshots

 

© Ying Bun 2021 - 2022