ºìÁªLinuxÃÅ»§
Linux°ïÖú

Too many open files´íÎó

·¢²¼Ê±¼ä:2008-03-26 12:49:56À´Ô´:ºìÁª×÷Õß:radio
ÎÒÕÒµ½ÁË£ºÔÚLinuxÄÚºË2.4.xÖÐÐèÒªÐÞ¸ÄÔ´´úÂ룬ȻºóÖØбàÒëÄں˲ÅÉúЧ¡£

±à¼­LinuxÄÚºËÔ´´úÂëÖÐµÄ include/linux/fs.hÎļþ£¬½« NR_FILE ÓÉ8192¸ÄΪ 65536£¬½«NR_RESERVED_FILES ÓÉ10 ¸ÄΪ 128¡£±à¼­fs/inode.c Îļþ½« MAX_INODE ÓÉ16384¸ÄΪ262144¡£Ò»°ãÇé¿öÏ£¬ÏµÍ³×î´ó´ò¿ªÎļþÊý±È½ÏºÏÀíµÄÉèÖÃΪÿ4MÎïÀíÄÚ´æ256£¬±ÈÈç256MÄÚ´æ¿ÉÒÔÉèΪ16384£¬¶ø×î´óµÄʹÓõÄi½ÚµãµÄÊýÄ¿Ó¦¸ÃÊÇ×î´ó´ò¿ªÎļþÊýÄ¿µÄ3±¶µ½4±¶¡£

ÁíÍ⣬¶Ôÿ¸ö½ø³ÌµÄÉèÖãº

ulimit -n 4096 ½«Ã¿¸ö½ø³Ì¿ÉÒÔ´ò¿ªµÄÎļþÊýÄ¿¼Ó´óµ½4096£¬È±Ê¡Îª1024

ulimit -m 4096 ÏÞÖÆÿ¸ö½ø³ÌʹÓõÄÄÚ´æÊý¡£²»¹ý£¬»¹ÊÇÒª¸Ðлyanglf911£¡

Õâ¸öÎÊÌâÎÒÒ²Óöµ½¹ý,¿ÉÒÔ½«WEBLOGICÏÞÖÆ×ÊÔ´Îļþ×¢Ê͵ô![code]/weblogic/bea/weblogic81/server/bin/startWLS.sh
#if [ ! -n "`uname -s |grep -i cygwin || uname -s |grep -i #windows_nt`" ]; then
# maxfiles=`ulimit -H -n`
# if [ !$? -a "${maxfiles}" != 1024 ]; then
# if [ "${maxfiles}" = "unlimited" ]; then
# maxfiles=1025
# fi
# if [ "${maxfiles}" -lt 1024 ]; then
# ulimit -n ${maxfiles}
# else
# ulimit -n 1024
# fi
# fi
# fi[/code]
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. Linux85fan ÓÚ 2008-03-26 22:15:01·¢±í:

    ÄãÏë¸ÉÂ£¿