cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ellis Pritchard <>
Subject FORTRESS-22: may effect people using AJAX block
Date Thu, 21 Dec 2006 11:35:44 GMT

I've just filed this issue against Excalibur:
    ResourceSource.getInfos() leaves URLConnection open, resulting in 
'too may open files' condition

This affected us on a busy live system serving dojo files from the jar 
in the ajax block; it's really dependent on how often GC kicks in, how 
busy your server is (serving ajax-using pages), and how many descriptors 
you've got per-process. It doesn't matter if the pipeline is cached or 
uncached, the validity checking is enough to trigger the 'leak'.

A configuration 'glitch' meant we had only 1024 file-descriptors 
available, which meant we hit this bug earlier than we might otherwise 
have. A work-around (other than to increase the number of 
file-descriptors and keep your fingers crossed) is to pick up files 
directly from where they are automatically de-archived:

            <map:match pattern="resources/*/**">
                <map:select type="resource-exists">
                     <map:when test="{0}">
                         <map:read src="{0}">
                             <map:parameter name="byte-ranges" 
                     <!-- test to see if resource has already been 
unarchived (saves file-descriptors); tomcat specific -->
                             <map:parameter name="byte-ranges" 
                         <!-- read resource from classpath -->
                             <map:parameter name="byte-ranges" 

That is, if possible, the files are picked up from the work directory, 
relative to catalina.base, rather than the jar. This will have to be 
adapted for other containers, unless there's some other way to do it (I 
don't think there's a context input-module so I can get at 
work-directory parameter?).

Hope this is useful to someone else!


View raw message