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)

          隨筆檔案

          文章分類

          文章檔案

          新聞分類

          新聞檔案

          相冊

          收藏夾

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 休宁县| 晴隆县| 贵定县| 陕西省| 岑巩县| 卢龙县| 海原县| 保亭| 牙克石市| 汝州市| 南丹县| 石渠县| 廉江市| 安丘市| 莲花县| 太和县| 天津市| 渝中区| 水富县| 莆田市| 新竹县| 辉县市| 邢台市| 湄潭县| 如皋市| 祥云县| 扎兰屯市| 遵义县| 木兰县| 乃东县| 扎鲁特旗| 咸宁市| 卓尼县| 清水河县| 全南县| 平远县| 桂东县| 夹江县| 且末县| 洱源县| 阿坝县|