国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Linux遭遇Too many open files

比較流行的發(fā)行版本,比如Debian/Ubuntu/Arch Linux/Gentoo的shell session限制都是1024。

大多數(shù)Linux發(fā)行版本中,正常情況下session中max open files數(shù)限制為1024,對(duì)于Weblogic Server部署過程來說太小了,必須增大。

臨時(shí)解決方法:
只對(duì)某個(gè)Terminal中的session起作用,用以下命令增加該數(shù)值。
ulimit -n 2048
繼續(xù)在此session中啟動(dòng)obpmadmcenter來配置directory和創(chuàng)建新的WLS domain用于部署bpm。如果選擇修改一個(gè)已經(jīng)存在的WLS domain的話,在執(zhí)行啟動(dòng)腳本的Terminal session中需要用同樣的方法增加該數(shù)值,否則多數(shù)會(huì)得到同樣的錯(cuò)誤。
ulimit -a
可以用來查看當(dāng)前session user的各種限制,當(dāng)然包括修改過的數(shù)值。


永久性解決方法:

1. 修改/etc/security/limits.conf (root)
增加如下
$user hard nofile 2048
$user是用來啟動(dòng)WLS的用戶。
2048是建議的數(shù)值,若遇到同樣問題可能需要再次增加。

或者干脆用*表示所有用戶:

* soft nofile 2048
* hard nofile 4096

2. 其他來自Debian GNU/Linux官方文檔和Oracle Technology Network的解決方法,直接修改內(nèi)核參數(shù),無須重啟系統(tǒng)。
sysctl -w fs.file-max 65536
或者
echo "65536" > /proc/sys/fs/file-max
兩者作用是相同的,前者改內(nèi)核參數(shù),后者直接作用于參數(shù)對(duì)應(yīng)的虛擬文件系統(tǒng)(procfs, psuedo file system)上對(duì)應(yīng)的文件而已。
可以用以下的命令查看新的限制
sysctl -a | grep fs.file-max
或者
cat /proc/sys/fs/file-max

修改內(nèi)核參數(shù)
/etc/sysctl.conf
echo "fs.file-max=65536" >> /etc/sysctl.conf
sysctl -p

查看當(dāng)前file handles使用情況:

sysctl -a | grep fs.file-nr

或者

cat /proc/sys/fs/file-nr
825 0 65536

另外一個(gè)命令:
lsof | wc -l
有點(diǎn)讓我困惑的是,以上兩個(gè)命令獲得的結(jié)果總是不相同的;-(

此外,用sysctl來修改內(nèi)核參數(shù)fs.file-max和用ulimit的區(qū)別,我花了不少時(shí)間研究,討教了Linux/FreeBSD/Solaris/OpenSolaris老鳥Jockey同學(xué),得到點(diǎn)撥之后終于基本弄清楚原委了。

基本上優(yōu)先級(jí):
soft limit < hard limit < kernel < 實(shí)現(xiàn)最大file descriptor數(shù)采用的數(shù)據(jù)結(jié)構(gòu)所導(dǎo)致的限制

The Linux kernel provides the getrlimit and setrlimit system calls to get and set resource limits per process. Each resource has an associated soft and hard limit. The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit: an unprivileged process may only set its soft limit to a value in the range from 0 up to the hard limit, and (irreversibly) lower its hard limit. A privileged process (one with the CAP_SYS_RESOURCE capability) may make arbitrary changes to either limit value.

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
CentOS最大文件描述符限制更改
How to increase file descriptors max limit on Linux
Linux系統(tǒng)調(diào)用--getrlimit()與setrlimit()函數(shù)詳解 ....
在Linux中打開了太多文件(Too many open files)的解決方法
weblogic: Too many open files解決辦法[03]
linux最大允許的文件描述符open files數(shù)nofile修改
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服