运行java程序,出现open too many files的解决办法
2010-02-06 09:22
861 查看
[root@slave ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16384
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@slave ~]# vi /etc/security/limits.conf
添加一行
#<domain> <type> <item> <value>
* - nofile 16384
[root@slave ~]# vi /etc/sysctl.conf#Decrease the tile default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 30
#Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1800
#Turn off tcp_window_scaling
net.ipv4.tcp_window_scaling = 0
# Turn off the tcp_sack
net.ipv4.tcp_sack = 0
#Turn off tcp_timestamps
net.ipv4.tcp_timestamps = 0
//修改tcp socks
重启系统
[root@slave ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16384
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16384
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@slave ~]# vi /etc/security/limits.conf
添加一行
#<domain> <type> <item> <value>
* - nofile 16384
[root@slave ~]# vi /etc/sysctl.conf#Decrease the tile default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 30
#Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1800
#Turn off tcp_window_scaling
net.ipv4.tcp_window_scaling = 0
# Turn off the tcp_sack
net.ipv4.tcp_sack = 0
#Turn off tcp_timestamps
net.ipv4.tcp_timestamps = 0
//修改tcp socks
重启系统
[root@slave ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16384
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
相关文章推荐
- 运行在Linux系统上的Java程序可能会出现"Too many open files"
- java.net.SocketException: Too many open files 问题的解决办法
- Linux 下Tomcat运行一段时间报java.net.SocketException: Too many open files的错误问题解决
- Apache NIO 框架 Mina 使用中出现 too many open files 问题的解决办法
- Apache NIO 框架 Mina 使用中出现 too many open files 问题的解决办法
- java.net.SocketException: Too many open files 问题的解决办法
- Apache NIO 框架 Mina 使用中出现 too many open files 问题的解决办法
- 运行ab测试时socket: Too many open files (24)的解决办法
- java.net.SocketException: Too many open files 问题的解决办法
- java.net.SocketException: Too many open files 问题的解决办法
- java.net.SocketException: Too many open files 问题的解决办法
- java.net.SocketException: Too many open files解决方法
- Mac上IntelliJ Idea运行Java程序时出现红色的警告解决办法-亲测有效
- 转:JAVA.NET.SOCKETEXCEPTION: TOO MANY OPEN FILES解决方法
- JAVA.NET.SOCKETEXCEPTION: TOO MANY OPEN FILES解决方法
- 关于too many files open的解决办法
- 解决java.net.SocketException: Too many open files
- nginx提示:Too many open files解决办法
- java.net.SocketException: Too many open files 问题的解决
- too many open files问题解决办法