jojo's blog--快樂憂傷都與你同在
          為夢想而來,為自由而生。 性情若水,風(fēng)起水興,風(fēng)息水止,故時而激蕩,時又清平……
          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 技術(shù)相關(guān)

          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.  回復(fù)  更多評論
            
          # 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)

          隨筆檔案

          文章分類

          文章檔案

          新聞分類

          新聞檔案

          相冊

          收藏夾

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 突泉县| 拉萨市| 江陵县| 裕民县| 万年县| 莎车县| 抚宁县| 泗水县| 长垣县| 巴中市| 营山县| 乐至县| 田林县| 南木林县| 麻栗坡县| 龙门县| 常熟市| 苏尼特左旗| 庆安县| 视频| 昆明市| 阳信县| 锦州市| 阆中市| 盱眙县| 吴川市| 河津市| 微山县| 新和县| 江阴市| 永顺县| 吉木乃县| 宜都市| 金川县| 洛扎县| 清水河县| 垦利县| 永兴县| 始兴县| 灵宝市| 来安县|