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

          <2009年4月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          常用鏈接

          留言簿(6)

          隨筆檔案

          文章分類

          文章檔案

          新聞分類

          新聞檔案

          相冊

          收藏夾

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 墨脱县| 株洲县| 襄汾县| 达日县| 泾川县| 扎囊县| 鄂托克前旗| 普兰县| 玛多县| 金坛市| 南安市| 清丰县| 荔浦县| 获嘉县| 成武县| 固原市| 丽江市| 高青县| 荣成市| 万安县| 营山县| 兖州市| 育儿| 永新县| 长阳| 唐河县| 屏东市| 乐平市| 墨竹工卡县| 双牌县| 兴海县| 饶阳县| 集贤县| 饶平县| 丹棱县| 古丈县| 筠连县| 榕江县| 开鲁县| 乌苏市| 东乡|