jojo's blog--快樂憂傷都與你同在
          為夢想而來,為自由而生。 性情若水,風起水興,風息水止,故時而激蕩,時又清平……
          posts - 11,  comments - 30,  trackbacks - 0

          Increase file descriptor limit under Linux to prevent

          java.net.SocketException: Too many open files

          Get current limit:

          ulimit -n

          cat /proc/sys/fs/file-nr

          The default limit is 1024.

          Get current number of open file descriptors:

          lsof [-p pid] | wc -l

          Increase the limit:

          Edit /etc/security/limits.conf:

          username hard nofile 32768

          posted on 2009-04-14 10:53 Blog of JoJo 閱讀(1004) 評論(2)  編輯  收藏 所屬分類: Linux 技術相關

          FeedBack:
          # re: Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files
          Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files
          Increase file descriptor limit under Linux to
          2009-04-14 10:57 | Blog of JoJo
          There are other places your application might be opening files than
          just URLConnection... for example every Runtime.exec() costs 3 open
          files.

          To check the limit, use "ulimit -a" or "ulimit -n" in the shell.

          This isn't a solution, but you can increase the limit by running
          "ulimit -n someNumber" in the shell before running the application, or
          put the command in your .bash_profile or similar place so it runs
          every time you login.

          The solution is to find out what files your application isn't closing,
          and make sure you close them. You can do that by doing "ls -l" in
          /proc/NN/fd, or running lsof on the process.  回復  更多評論
            
          # re: Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files
          Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files
          Increase file descriptor limit under Linux to

          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(6)

          隨筆檔案

          文章分類

          文章檔案

          新聞分類

          新聞檔案

          相冊

          收藏夾

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 惠州市| 安龙县| 德钦县| 漯河市| 泗阳县| 车险| 康定县| 营口市| 饶阳县| 金门县| 南宁市| 瑞丽市| 麦盖提县| 城步| 阜宁县| 临海市| 嘉定区| 宣化县| 阜新市| 秦安县| 双流县| 徐汇区| 张北县| 蒙山县| 宜黄县| 昌黎县| 炎陵县| 翼城县| 淅川县| 威宁| 汤阴县| 泽普县| 奉贤区| 忻城县| 高阳县| 木兰县| 罗山县| 东源县| 岫岩| 阿拉善左旗| 庄河市|