服务器配置:linux
服务:resin3.2 默认使用内存1024M
java.io.FileNotFoundException: /www/tmp/digi/smallpic.properties (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at com.tom.webutil.refresh.manager.BuildFile.bulidFile(Unknown Source)
at _jsp._pages._getpice__jsp._jspService(_getpice__jsp.java:134)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
at java.lang.Thread.run(Thread.java:595)
服务:resin3.2 默认使用内存1024M
java.io.FileNotFoundException: /www/tmp/digi/smallpic.properties (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at com.tom.webutil.refresh.manager.BuildFile.bulidFile(Unknown Source)
at _jsp._pages._getpice__jsp._jspService(_getpice__jsp.java:134)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
at java.lang.Thread.run(Thread.java:595)
解决方案 »
- 为什么iframe的width height 设为100% iframe不见了?
- tomcat+sqlserver jsp 程序 注册只会提示:注册失败 高手帮忙
- JBuilder2007 打通任督二脉的崭新Java开发工具
- resin启动出错:In-place class redefinition (HotSwap) is not available 怎么解决?
- StringTokenizer的复位问题
- 我用Java和Jsp做好的BS程序给客户安装怎么加密呀,不会把源程序都给客户服务器装上吧
- 不用bean怎样操作数据库?
- 在客房端,让某个session注销怎么弄?
- 请问哪里有关于InstantDB数据库的中文资料?谢谢
- maven中的配置设置编译版本是啥意思,是jdk的版本吗???
- 向数据库中插入不了记录
- 如何在网页某个区域显示非发布目录下的图片和其他文件,JSp
1、ulimit -n 8196 加大linux最大打开文件数,不过这个试过好像不太管用.
2、echo "10240" >/proc/sys/fs/file-max第二种方法好像更管用。先试试看。。真不想重新编译linux内核下面这个是晚上瞎转在网上看到的以下适合redhat linux 2.4 Linux 内核有时会报告“Too many open files”,起因是 file-max 默认值(8096)太小。要解决这个问题,可以 root 身份执行下列命令:(或将它们加入/etc/rcS.d/*下的 init 脚本。) # echo "65536" > /proc/sys/fs/file-max # 适用于 2.2 和 2.4 版内核
# echo "131072" > /proc/sys/fs/inode-max # 仅适用于 2.2 版内核或将下列内容放入 /etc/sysctl.conf,做永久性的更改: fs.file-max = 65536 # 适用于 2.2 和 2.4 版内核
fs.inode-max = 131072 # 仅适用于 2.2 版内核
各种连接,文件都共享一个句柄空间的,句柄上限满了就会报这个错。分析原因:
可能A: 连接未关闭,包括普通scoket连接, 数据库连接。
可能B: 其他http请求过多等(一般不会)
可能C:打开的文件等资源没有释放
可能D:所有占句柄的虽然释放了,但是没有人工释放,在垃圾回收中积累着。某时刻就爆了