myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Andraschko (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-4228) File Descriptor leak in DefaultFaceletFactory
Date Fri, 04 May 2018 13:30:00 GMT

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

Thomas Andraschko resolved MYFACES-4228.
----------------------------------------
    Resolution: Fixed
      Assignee: Thomas Andraschko

> File Descriptor leak in DefaultFaceletFactory
> ---------------------------------------------
>
>                 Key: MYFACES-4228
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4228
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.12
>         Environment: CentOS 7
>            Reporter: Peter Rainer
>            Assignee: Thomas Andraschko
>            Priority: Major
>             Fix For: 2.2.13, 2.3.2
>
>         Attachments: _MYFACES_4228__closing_URLConnection_in_needsToBeRefreshed__.patch
>
>
> URLConnection opened in line 346 of DefaultFaceletFactory.java is never closed
>  
>  
> {code:java}
> try
> {
>     URLConnection conn = facelet.getSource().openConnection();
>     long lastModified = ResourceLoaderUtils.getResourceLastModified(conn);
>     return lastModified == 0 || lastModified > target;
> }
> catch (IOException e)
> {
>     throw new FaceletException("Error Checking Last Modified for " + facelet.getAlias(),
e);
> }
> {code}
>  
> While this usually isn't an issue in most production environments, because the javax.faces.FACELETS_REFRESH_PERIOD
is set either -1 or a high value, this can cause unexpected side effects in both test and
hot-deploy production environments.
>  
> The result of this issue is that every time the lastModified for a composite component
is checked, the composite component file descriptor does stay open - on my test environment
we did have 500k open file descriptors for composite component xhtml files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message