You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "David del Pozo González (Commented JIRA)" <ji...@apache.org> on 2012/01/13 12:14:39 UTC

[jira] [Commented] (WOOKIE-302) Too many open files by Wookie

    [ https://issues.apache.org/jira/browse/WOOKIE-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185549#comment-13185549 ] 

David del Pozo González commented on WOOKIE-302:
------------------------------------------------

It probably is related with some bug in classes which manage .wgt files.

By the way, I passed the FindBugs to source code and it discovered some streams not closed. It may help:
org.apache.wookie.beans.jpa.JPAPersistenceManager: Line 247, there is a "InputStream" called "propertiesStream" that does not close.
org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 87, there is a "LineNumberReader" called "lineReader" that does not close.
org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 114, there is a "LineNumberReader" called "lineReader" that does not close.
org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 143, there is a "LineNumberReader" called "lineReader" that does not close.
                
> Too many open files by Wookie
> -----------------------------
>
>                 Key: WOOKIE-302
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-302
>             Project: Wookie
>          Issue Type: Bug
>          Components: Server
>         Environment: Linux 2.6.26-2-xen-amd64 #1 SMP Thu Nov 25 06:39:26 UTC 2010 x86_64 GNU/Linux
> Apache Tomcat 6.0.29
> MySQL 5.1
>            Reporter: David del Pozo González
>              Labels: file, resources
>         Attachments: lsof.txt
>
>
> It seems that Wookie opened too many files at the same moment or that Wookie did not close the open resources
> catalina.out
> 10:04:04,584 ERROR ContextListener:206 - natter.wgt:Hot deploy error: Unable to move dropped .wgt file to upload folder - /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt (Too many open files)
> java.io.FileNotFoundException: /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt (Too many open files)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:106)
>         at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:669)
>         at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:653)
>         at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:607)
>         at org.apache.wookie.util.WidgetFileUtils.dealWithDroppedFile(WidgetFileUtils.java:99)
>         at org.apache.wookie.server.ContextListener$1$1.fileModified(ContextListener.java:181)
>         at org.apache.wookie.util.WgtWatcher.check(WgtWatcher.java:95)
>         at org.apache.wookie.server.ContextListener$1.run(ContextListener.java:233)
> This command "lsof -p 1720 | grep wookie | wc -l" returns 854 files opened by Wookie: It shows open files by Tomcat PID and then filter by Wookie app, I attached the result of the command "lsof -p 1720", the most opened files are ".wgt" files from "upload" folder, they are opened several times.

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

       

Re: [jira] [Commented] (WOOKIE-302) Too many open files by Wookie

Posted by Ross Gardler <rg...@opendirective.com>.
David may not have seen this reply as he may not be on the list.

We really ought to get find bugs and other such useful tools set up on a
Hudson server here.

Sent from my mobile device, please forgive errors and brevity.
On Jan 13, 2012 11:38 AM, "Scott Wilson" <sc...@gmail.com>
wrote:

> Thanks for the bug report David - do you think you could check if closing
> those streams stops the number of open files growing?
>
> On 13 Jan 2012, at 11:14, David del Pozo González (Commented) (JIRA) wrote:
>
> >
> >    [
> https://issues.apache.org/jira/browse/WOOKIE-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185549#comment-13185549]
> >
> > David del Pozo González commented on WOOKIE-302:
> > ------------------------------------------------
> >
> > It probably is related with some bug in classes which manage .wgt files.
> >
> > By the way, I passed the FindBugs to source code and it discovered some
> streams not closed. It may help:
> > org.apache.wookie.beans.jpa.JPAPersistenceManager: Line 247, there is a
> "InputStream" called "propertiesStream" that does not close.
> > org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 87, there is
> a "LineNumberReader" called "lineReader" that does not close.
> > org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 114, there
> is a "LineNumberReader" called "lineReader" that does not close.
> > org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 143, there
> is a "LineNumberReader" called "lineReader" that does not close.
> >
> >> Too many open files by Wookie
> >> -----------------------------
> >>
> >>                Key: WOOKIE-302
> >>                URL: https://issues.apache.org/jira/browse/WOOKIE-302
> >>            Project: Wookie
> >>         Issue Type: Bug
> >>         Components: Server
> >>        Environment: Linux 2.6.26-2-xen-amd64 #1 SMP Thu Nov 25 06:39:26
> UTC 2010 x86_64 GNU/Linux
> >> Apache Tomcat 6.0.29
> >> MySQL 5.1
> >>           Reporter: David del Pozo González
> >>             Labels: file, resources
> >>        Attachments: lsof.txt
> >>
> >>
> >> It seems that Wookie opened too many files at the same moment or that
> Wookie did not close the open resources
> >> catalina.out
> >> 10:04:04,584 ERROR ContextListener:206 - natter.wgt:Hot deploy error:
> Unable to move dropped .wgt file to upload folder -
> /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt
> (Too many open files)
> >> java.io.FileNotFoundException:
> /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt
> (Too many open files)
> >>        at java.io.FileInputStream.open(Native Method)
> >>        at java.io.FileInputStream.<init>(FileInputStream.java:106)
> >>        at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:669)
> >>        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:653)
> >>        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:607)
> >>        at
> org.apache.wookie.util.WidgetFileUtils.dealWithDroppedFile(WidgetFileUtils.java:99)
> >>        at
> org.apache.wookie.server.ContextListener$1$1.fileModified(ContextListener.java:181)
> >>        at org.apache.wookie.util.WgtWatcher.check(WgtWatcher.java:95)
> >>        at
> org.apache.wookie.server.ContextListener$1.run(ContextListener.java:233)
> >> This command "lsof -p 1720 | grep wookie | wc -l" returns 854 files
> opened by Wookie: It shows open files by Tomcat PID and then filter by
> Wookie app, I attached the result of the command "lsof -p 1720", the most
> opened files are ".wgt" files from "upload" folder, they are opened several
> times.
> >
> > --
> > This message is automatically generated by JIRA.
> > If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> > For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> >
> >
>
>

Re: [jira] [Commented] (WOOKIE-302) Too many open files by Wookie

Posted by Scott Wilson <sc...@gmail.com>.
Thanks for the bug report David - do you think you could check if closing those streams stops the number of open files growing?

On 13 Jan 2012, at 11:14, David del Pozo González (Commented) (JIRA) wrote:

> 
>    [ https://issues.apache.org/jira/browse/WOOKIE-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185549#comment-13185549 ] 
> 
> David del Pozo González commented on WOOKIE-302:
> ------------------------------------------------
> 
> It probably is related with some bug in classes which manage .wgt files.
> 
> By the way, I passed the FindBugs to source code and it discovered some streams not closed. It may help:
> org.apache.wookie.beans.jpa.JPAPersistenceManager: Line 247, there is a "InputStream" called "propertiesStream" that does not close.
> org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 87, there is a "LineNumberReader" called "lineReader" that does not close.
> org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 114, there is a "LineNumberReader" called "lineReader" that does not close.
> org.apache.wookie.util.WidgetJavascriptSyntaxAnalyzer: Line 143, there is a "LineNumberReader" called "lineReader" that does not close.
> 
>> Too many open files by Wookie
>> -----------------------------
>> 
>>                Key: WOOKIE-302
>>                URL: https://issues.apache.org/jira/browse/WOOKIE-302
>>            Project: Wookie
>>         Issue Type: Bug
>>         Components: Server
>>        Environment: Linux 2.6.26-2-xen-amd64 #1 SMP Thu Nov 25 06:39:26 UTC 2010 x86_64 GNU/Linux
>> Apache Tomcat 6.0.29
>> MySQL 5.1
>>           Reporter: David del Pozo González
>>             Labels: file, resources
>>        Attachments: lsof.txt
>> 
>> 
>> It seems that Wookie opened too many files at the same moment or that Wookie did not close the open resources
>> catalina.out
>> 10:04:04,584 ERROR ContextListener:206 - natter.wgt:Hot deploy error: Unable to move dropped .wgt file to upload folder - /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt (Too many open files)
>> java.io.FileNotFoundException: /home/user/applications/apache-tomcat-6.0.29/webapps/wookie/deploy/natter.wgt (Too many open files)
>>        at java.io.FileInputStream.open(Native Method)
>>        at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>        at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:669)
>>        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:653)
>>        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:607)
>>        at org.apache.wookie.util.WidgetFileUtils.dealWithDroppedFile(WidgetFileUtils.java:99)
>>        at org.apache.wookie.server.ContextListener$1$1.fileModified(ContextListener.java:181)
>>        at org.apache.wookie.util.WgtWatcher.check(WgtWatcher.java:95)
>>        at org.apache.wookie.server.ContextListener$1.run(ContextListener.java:233)
>> This command "lsof -p 1720 | grep wookie | wc -l" returns 854 files opened by Wookie: It shows open files by Tomcat PID and then filter by Wookie app, I attached the result of the command "lsof -p 1720", the most opened files are ".wgt" files from "upload" folder, they are opened several times.
> 
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
>