Advertisement
Guest User

Untitled

a guest
May 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. # maximum capability of system
  2. user@ubuntu:~$ cat /proc/sys/fs/file-max
  3. 708444
  4.  
  5. # available limit
  6. user@ubuntu:~$ ulimit -n
  7. 1024
  8.  
  9. # To increase the available limit to say 200000
  10. user@ubuntu:~$ sudo vim /etc/sysctl.conf
  11.  
  12. # add the following line to it
  13. fs.file-max = 200000
  14.  
  15. # run this to refresh with new config
  16. user@ubuntu:~$ sudo sysctl -p
  17.  
  18. # edit the following file
  19. user@ubuntu:~$ sudo vim /etc/security/limits.conf
  20.  
  21. # add following lines to it
  22.  
  23. * soft nofile 200000
  24. * hard nofile 200000
  25. www-data soft nofile 200000
  26. www-data hard nofile 200000
  27. root soft nofile 200000
  28. root hard nofile 200000
  29.  
  30. # edit the following file
  31. user@ubuntu:~$ sudo vim /etc/pam.d/common-session
  32.  
  33. # add this line to it
  34. session required pam_limits.so
  35.  
  36. # logout and login and try the following command
  37. user@ubuntu:~$ ulimit -n
  38. 200000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement