Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Too Many Files open error in web application  RSS feed

 
Anand Bhatt
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have one web application deployed on weblogic server.
Now when I am navigating from one jsp to another jsp I frequently encountered the 'Error 500-Internal servererror ' page .
When I checked the application logs found something as below:

java.io.FileNotFoundException: /wls_domains/tmp/_WL_user/appName/98m0hn/war/home.htm (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:25)
at weblogic.servlet.internal.WarSource.getInputStream(WarSource.java:62)
at weblogic.servlet.FileServlet.sendFile(FileServlet.java:397)
at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:231)
at weblogic.servlet.FileServlet.service(FileServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3244)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)



Please suggest what could be the cause for this behaviour. How can I overcome this issue.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual cause is having your application open files that it never closes, so if this was my problem I would start by locating all the code that opens a file.

Bill
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The stack trace seems to indicate that none of your own code is involved?
Does your own code open files and not close them in other places?

Seeing as it is a *nix system, You might also want to check how many file handles your system is configured to allow opened at one time.



 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
stack trace seems to indicate that none of your own code is involved?


The tricky thing about this kind of error is that it can be triggered by normal operation, far from the code that leaves the files open.

Bill
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typical scenarios for this would be unclosed database connections, file I/O.
 
Anand Bhatt
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for your advice .
issue solved by modifying ulimit parameter in unix
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!