Ubuntu 16 永久修改ulimit中的max file open限制
来源:互联网 发布:网络销售渠道有哪2种 编辑:程序博客网 时间:2024/06/08 06:23
Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )
以下内容为此网页搬运过来的
https://codingweb.lj.studio/ubuntu-16-increase-maximum-file-open-limit-ulimit-n/
版权归该文章作者所有。
If you are setting up nginx,chances are you will discover your worker_connections is at some low number, such as 1024.
You can’t increase this number unless you increase kernel limit as well.
First of all run cat /proc/sys/fs/file-max to discover your maximum limit.
abc@ubuntu:~$ cat /proc/sys/fs/file-max1048576abc@ubuntu:~$ ulimit -n1024
As you can see there’s plenty of space for improvement. Lets say I want my new ‘ulimit -n’ to read 131072.
abc@ubuntu:~$ sudo nano /etc/sysctl.conf
add
fs.file-max = 131072
run
sudo sysctl -p
edit
sudo nano /etc/security/limits.conf
add
* soft nproc 131072 * hard nproc 131072 * soft nofile 131072 * hard nofile 131072root soft nproc 131072 root hard nproc 131072 root soft nofile 131072 root hard nofile 131072
sudo nano /etc/pam.d/common-session
add
session required pam_limits.so
And that’s it. Log out and in and try ulimit -n
abc@ubuntu:~$ ulimit -n 131072
Now you can edit nginx as well
events { worker_connections 131072; use epoll; multi_accept on;}
阅读全文
0 0
- Ubuntu 16 永久修改ulimit中的max file open限制
- 修改 Ubuntu ulimit 限制
- 修改 Ubuntu ulimit 限制
- 修改 Ubuntu ulimit 限制
- linux有效修改max open files/ulimit -n
- Linux中修改openfile大小(max open files/ulimit -n )
- linux有效修改max open files/ulimit -n
- linux ulimit max open files
- linux ulimit max open files
- 修改linux ulimit 限制
- linux ulimit 查看max open files
- 修改linux资源限制---ulimit
- 修改linux资源限制---ulimit
- 修改apache的ulimit限制
- ubuntu永久修改主机名
- ubuntu永久修改主机名
- ubuntu永久修改主机名
- ubuntu永久修改主机名
- bzoj 1230 lites 开关灯 线段树巧妙应用
- Spring Boot初体验
- unsigned short A = 10; printf("~A = %u\n", ~A);
- Jdk9更新导致Eclipse启动不了(版本冲突)
- equals方法类中重写
- Ubuntu 16 永久修改ulimit中的max file open限制
- HDU
- while(!Die())
- shell位置参数和特殊变量
- swift多线程
- 信息列表+上传文件
- 利用java代码自动下载嗨学网的学习视频
- 博文收藏
- 2017/010/6 SSM框架学习记录