[jira] [Commented] (MYFACES-4228) File Descriptor leak in DefaultFaceletFactory

2018-05-03 Thread Peter Rainer (JIRA)

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

Peter Rainer commented on MYFACES-4228:
---

Just added a patch, hope that helps :) 

> 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
>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)


[jira] [Commented] (MYFACES-4228) File Descriptor leak in DefaultFaceletFactory

2018-05-03 Thread Peter Rainer (JIRA)

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

Peter Rainer commented on MYFACES-4228:
---

I will create one later today

> 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
>Priority: Major
> Fix For: 2.2.13, 2.3.2
>
>
> 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)


[jira] [Created] (MYFACES-4228) File Descriptor leak in DefaultFaceletFactory

2018-05-03 Thread Peter Rainer (JIRA)
Peter Rainer created MYFACES-4228:
-

 Summary: 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


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)