Do all your file closing manually if you are openign any file, socket, Close
it explicitly in your Finally block
Do not wait for the garbage collector to close the opened resources, because
by the time GC starts going about its job,
You have got a lot of resources open, as this is a servlet environment ,
where each request may be opening new resources

Manish

> -----Original Message-----
> From: Volker Gerstner [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 10, 2001 8:51 PM
> To:   [EMAIL PROTECTED]
> Subject:      Allaire JRUN-error: too many files open
>
> Hi all,
>
> we are using Allaire JRUN Version 3.0 for our web-application
> (Operating System: SunOS Version 5.8
> Java Virtual Machine: build Solaris_JDK_1.2.2_05a, native threads, sunwjit
> from Sun Microsystems Inc.
> JRun 3.0 3.02.11140 Starting default...
> Current Locale: en_US
> Loading scheduler
> Loading logging)
>
> The problem is that the number of opened file handles, which are assigned
> to
> the underlaying Jrun process of the web-application, is steadily
> increasing,
> although there are time periods, when the traffic is low and the number of
> accesses is nearly zero, so that the number of opened file handles
> normally
> has to decrease, which doesn't happen. That leads - if we do not restart
> the
> Jrun server - sooner or later (depending on the traffic) to the below
> described error.
> I hope, that you can help us,
>
> best regards and thanks in advance
> V. Gerstner
>   (email: [EMAIL PROTECTED])
>
>
> java.io.FileNotFoundException: /WWW/jrun/expert/WEB-INF/lib/classes111.zip
> (Too many open files)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.open(Compiled Code)
>         at java.io.FileInputStream.<init>(Compiled Code)
>         at java.io.FileInputStream.<init>(Compiled Code)
>         at allaire.jrun.resource.LocalFile.getInputStream(Compiled Code)
>         at allaire.jrun.resource.JarResource.getInputStream(Compiled Code)
>         at allaire.jrun.resource.JarResource.getBytes(Compiled Code)
>         at allaire.jrun.resource.JarEntryResource.getBytes(Compiled Code)
>         at allaire.jrun.resource.JarEntryResource.getSize(Compiled Code)
>         at
> allaire.jrun.servlet.JRunURLConnection.getContentLength(Compiled Code)
>         at allaire.jrun.servlet.JRunServletLoader.getClassBytes(Compiled
> Code)
>         at allaire.jrun.servlet.JRunServletLoader.loadClass(Compiled Code)
>         at allaire.jrun.servlet.JRunServletLoader.loadClass(Compiled Code)
>         at java.lang.ClassLoader.loadClass(Compiled Code)
>         at java.lang.ClassLoader.loadClassInternal(Compiled Code)
>         at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
>         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
> Code)
>         at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at de.proplant.shared.sql.Database.<init>(Compiled Code)
>         at de.proplant.ppweb.global.JspUtils.handleFehlSeiteText(Compiled
> Code)
>         at jrun__fehlendes__fehlinhalt2ejsp19._jspService(Compiled Code)
>         at allaire.jrun.jsp.HttpJSPServlet.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunNamedDispatcher.forward(Compiled Code)
>         at allaire.jrun.jsp.JSPServlet.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunRequestDispatcher.forward(Compiled
> Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JvmContext.dispatch(Compiled Code)
>         at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code)
>         at allaire.jrun.ThreadPool.run(Compiled Code)
>         at allaire.jrun.WorkerThread.run(Compiled Code)
> java.io.FileNotFoundException: /WWW/jrun/expert/WEB-INF/lib/classes111.zip
> (Too many open files)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.open(Compiled Code)
>         at java.io.FileInputStream.<init>(Compiled Code)
>         at java.io.FileInputStream.<init>(Compiled Code)
>         at allaire.jrun.resource.LocalFile.getInputStream(Compiled Code)
>         at allaire.jrun.resource.JarResource.getInputStream(Compiled Code)
>         at allaire.jrun.resource.JarResource.getBytes(Compiled Code)
>         at allaire.jrun.resource.JarEntryResource.getBytes(Compiled Code)
>         at allaire.jrun.resource.JarEntryResource.getSize(Compiled Code)
>         at
> allaire.jrun.servlet.JRunURLConnection.getContentLength(Compiled Code)
>         at allaire.jrun.servlet.JRunServletLoader.getClassBytes(Compiled
> Code)
>         at allaire.jrun.servlet.JRunServletLoader.loadClass(Compiled Code)
>         at allaire.jrun.servlet.JRunServletLoader.loadClass(Compiled Code)
>         at java.lang.ClassLoader.loadClass(Compiled Code)
>         at java.lang.ClassLoader.loadClassInternal(Compiled Code)
>         at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
>         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
> Code)
>         at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at de.proplant.shared.sql.Database.<init>(Compiled Code)
>         at de.proplant.ppweb.global.JspUtils.handleJspTranslator(Compiled
> Code)
>         at
> jrun__anwendung__startseite__startseiteie2ejsp26._jspService(Compiled
> Code)
>         at allaire.jrun.jsp.HttpJSPServlet.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunNamedDispatcher.forward(Compiled Code)
>         at allaire.jrun.jsp.JSPServlet.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code)
>         at allaire.jrun.servlet.JRunRequestDispatcher.forward(Compiled
> Code)
>         at allaire.jrun.servlet.JRunSE.service(Compiled Code)
>         at allaire.jrun.servlet.JvmContext.dispatch(Compiled Code)
>         at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code)
>         at allaire.jrun.ThreadPool.run(Compiled Code)
>         at allaire.jrun.WorkerThread.run(Compiled Code)
> ...
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to