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 閱讀(1003) 評論(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)

          隨筆檔案

          文章分類

          文章檔案

          新聞分類

          新聞檔案

          相冊

          收藏夾

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 吉木萨尔县| 西城区| 垫江县| 新巴尔虎右旗| 平南县| 呼伦贝尔市| 高雄市| 九台市| 田东县| 同仁县| 山东| 应用必备| 新沂市| 富裕县| 扎赉特旗| 嫩江县| 永嘉县| 曲阳县| 江山市| 秦皇岛市| 长汀县| 平山县| 呈贡县| 当阳市| 门源| 会理县| 锡林郭勒盟| 娱乐| 永兴县| 关岭| 菏泽市| 延川县| 金山区| 石首市| 洛南县| 搜索| 宜州市| 习水县| 河北区| 霍林郭勒市| 东台市|