Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Verification
- Check your system limits:
- $ cat /proc/sys/fs/file-max
- $ sysctl -a |grep fs.file-max
- To check the number of file descriptors used by any given process use
- $ ls -la /proc/<pid>/fd
- or use the lsof (LiSt Open Files) command
- $ lsof -p <pid of process>
- or (my favourite)
- $ lsof -p <pid> | wc -l
- non of the above were sufficient under Ubuntu. Please run
- $ ulimit -n
- 1024 is too few. Note that ulimit is built into bash, not a program of its own. If you use something else, type bash to change the shell for the ulimit command. Please apply both steps of the following solution
- Solution
- System wide limit change
- Change limit by editing /etc/sysctl.conf and set fs.file-max to 400000
- Then run
- $ sysctl -p
- to apply your changes to your system. May need reboot.
- Per user/process limit change
- For Linux systems running PAM (that is e.g. Ubuntu) you will need to adjust /etc/security/limits.conf
- tomcatservice hard nofile 5000
- ulimit -n5000 has not worked for me in the past, but can always give it a try.
Add Comment
Please, Sign In to add comment