Linux????ó???????????????????
???????????? ???????[ 2013/5/29 10:14:07 ] ????????
??????????Linux?????Java????????????????????"Too many open files"?????????
???????????????????????????????????????????????????????????????????socket??Linux?ж??????file????????????????????file??name??location??access authority?????????????????????屻???file entry??“open files table”????г????????洢??Щfile entry???????????????????????????????file descriptor??????????open files table????????open files table???±?????????????????????????????????????????
????????????ж??????file descriptor table????????????????(open or create)??????????????????????????open files table???????file entry?????????????open files table?????????file entry??Linux??????open files table??????????????????????????????????????????????????Too many open files?????????????????????????????
??????????
??????????????????????Ч??????????????????????????
????1??cat /proc/sys/fs/file-max
????2??sysctl -a ???????fs.file-max?????????????
?????????????????????????/etc/sysctl.conf?????????fs.file-max?????????????????????
???????????????sysctl -p??????????????????
???????????
????Linux???????????????????????????????? ulimit -n?????????Ч???á???????????????? ulimit -n <setting number> ???
??????????????????????????????????????2???????ο????統(tǒng)????????????????1024?????????2048??????????????????4096???????????
?????????Too many open files?????????????????????????????????????socket???????????????λ?????????Java???????????Java??????????????????????????????
lsof -p $java_pid ?????????????????????
lsof -p $java_pid | wc -l ???Java????file descriptor table??FD??????
????????????????????ж???????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11