SHARE
TWEET

Untitled

a guest Dec 9th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Verification
  2. Check your system limits:
  3.  
  4. $ cat /proc/sys/fs/file-max
  5. $ sysctl -a |grep fs.file-max
  6.  
  7.  
  8. To check the number of file descriptors used by any given process use
  9.  
  10. $ ls -la /proc/<pid>/fd
  11. or use the lsof (LiSt Open Files) command
  12.  
  13. $ lsof -p <pid of process>
  14. or (my favourite)
  15.  
  16. $ lsof -p <pid> | wc -l
  17. non of the above were sufficient under Ubuntu. Please run
  18.  
  19. $ ulimit -n
  20. 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
  21.  
  22.  
  23. Solution
  24. System wide limit change
  25. Change limit by editing /etc/sysctl.conf and set fs.file-max to 400000
  26. Then run
  27.  
  28. $ sysctl -p
  29. to apply your changes to your system. May need reboot.
  30.  
  31.  
  32. Per user/process limit change
  33. For Linux systems running PAM (that is e.g. Ubuntu)  you will need to adjust /etc/security/limits.conf
  34. tomcatservice hard nofile 5000
  35.  
  36.  
  37.  
  38. ulimit -n5000    has not worked for me in the past, but can always give it a try.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top