excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <...@excalibur.apache.org>
Subject [jira] Closed: (EXLBR-32) ResourceSource.getInfos() leaves URLConnection open, resulting in 'too may open files' condition
Date Fri, 05 Jan 2007 07:11:28 GMT

     [ https://issues.apache.org/jira/browse/EXLBR-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Carsten Ziegeler closed EXLBR-32.
---------------------------------


> ResourceSource.getInfos() leaves URLConnection open, resulting in 'too may open files'
condition
> ------------------------------------------------------------------------------------------------
>
>                 Key: EXLBR-32
>                 URL: https://issues.apache.org/jira/browse/EXLBR-32
>             Project: Excalibur Components
>          Issue Type: Bug
>          Components: SourceResolver
>    Affects Versions: 2.2, 2.1
>         Environment: Sun Solaris 5.9
> JDK 1.4
> Cocoon 2.1.8
>            Reporter: Ellis Pritchard
>         Assigned To: Carsten Ziegeler
>             Fix For: 2.2
>
>
> org.apache.excalibur.source.impl.ResourceSource#getInfos() opens a URLConnection [line
79] to obtain information about the resource, however, it does not cause this connection to
be closed (i.e. call getInputStream() and then close() that), thus the resulting file-descriptor
will only be closed when the garbage collector collects the URLConnection object.
> Quote from java.net.URLConnection javadoc:
> "Calling the close() methods on the InputStream or OutputStream of an URLConnection after
a request may free network resources associated with this instance, unless particular protocol
specifications specify different behaviours for it."
> On a high-load system, which is accessing resources in jars frequently (even if only
as a side-effect of calling getValidity()), this may result in all available file-descriptors
being used within a short period, and because GC is not kicked off when a process runs out
of file-descriptors, this can result in a DoS.
> This problem has occured on a live system running Apache Cocoon 2.1.8.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org


Mime
View raw message