You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Marco Malavolta (Created) (JIRA)" <ji...@apache.org> on 2012/02/03 12:43:54 UTC

[jira] [Created] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Memory leak using jsp tags on an app deployed on glassfish
----------------------------------------------------------

                 Key: WW-3751
                 URL: https://issues.apache.org/jira/browse/WW-3751
             Project: Struts 2
          Issue Type: Bug
          Components: Other
    Affects Versions: 2.3.1.1, 2.3.1, 2.2.3, 2.2.1.1, 2.2.1
         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit

Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
Ram: 6.00 GB

GlassFish Server Open Source Edition 3.1.1 (build 12).

It also happens in production environment with different hardware configuration running Linux

            Reporter: Marco Malavolta


I have some webapps based on Struts 2 framework.

I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).

Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.

This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted

After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.

I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.

Basically I'm not sure if it's a struts problem or a problem of glass fish.
Perhaps the second hypothesis is more likely

Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Updated] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Malavolta updated WW-3751:
--------------------------------

    Attachment: screenshot-1 - VisualVM.jpg
    
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Updated] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3751:
------------------------------

    Fix Version/s: 2.3.7
    
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>             Fix For: 2.3.7
>
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199750#comment-13199750 ] 

Maurizio Cucchiara commented on WW-3751:
----------------------------------------

Ciao Marco,
is this related with WW-3702 in someway?
No problem for me. We could put the issue on hold at the moment and seeing what happens on the Glassfish side.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199776#comment-13199776 ] 

Marco Malavolta commented on WW-3751:
-------------------------------------

Ciao Maurizio,

This issue is not directly related to https://issues.apache.org/jira/browse/WW-3702.
I fell into two issues, the first (and not the worst in terms of burned memory) was the one reported in WW-3702. It has been solved by glassfish 3.1 release, probably by some fixes on Weld.
If you have a chance to take a look at the sample app i've posted on glassfish's jira, you will notice that no plugins are involved. I've only linked the latest struts2-core libraries. 

Thank you for your utra fast willingness, which I appreciate a lot.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Issue Comment Edited] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199776#comment-13199776 ] 

Marco Malavolta edited comment on WW-3751 at 2/3/12 3:35 PM:
-------------------------------------------------------------

Ciao Maurizio,

This issue is not directly related to WW-3702.
I fell into two issues, the first (and not the worst in terms of burned memory) was the one reported in WW-3702. It has been solved by glassfish 3.1 release, probably by some fixes on Weld.
If you have a chance to take a look at the sample app i've posted on glassfish's jira, you will notice that no plugins are involved. I've only linked the latest struts2-core libraries. 

Thank you for your utra fast willingness, which I appreciate a lot.
                
      was (Author: marco.malavolta):
    Ciao Maurizio,

This issue is not directly related to https://issues.apache.org/jira/browse/WW-3702.
I fell into two issues, the first (and not the worst in terms of burned memory) was the one reported in WW-3702. It has been solved by glassfish 3.1 release, probably by some fixes on Weld.
If you have a chance to take a look at the sample app i've posted on glassfish's jira, you will notice that no plugins are involved. I've only linked the latest struts2-core libraries. 

Thank you for your utra fast willingness, which I appreciate a lot.
                  
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204392#comment-13204392 ] 

Marco Malavolta commented on WW-3751:
-------------------------------------

Thank you very much Maurizio, we are going to apply your hint today to our staging environments. Fingers Crossed
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200412#comment-13200412 ] 

Marco Malavolta commented on WW-3751:
-------------------------------------

Glassfish's team closed the issue with this explanation:

"An instance of JspWriterImpl (and its associated response buffer) is created for every request. It should be released at the end of the request. If that is not the case, then someone else is holding on to the page or the request, but this is not the problem with JspWriterImpl per se."

Can you investigate?
 

                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217322#comment-13217322 ] 

Marco Malavolta commented on WW-3751:
-------------------------------------

The trick does not work. 
After setting jasper to use pool, some other classes than JspWriterImpl hangs on memory and produces the same result.
Finally I've switched to tomcat, I will reintroduce ejbs once tomee will be released on a final version.

Only one more thing.
I followed this instruction  http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html in order to add cdi support to tomcat. 
The strut2 cdi plugin does not work because it searches the beanManager with those keys: "java:comp/BeanManager" and "java:app/BeanManager". 
Tomcat only allows to bind entries to java:comp/env, so the BeanManager is available at java:comp/env/BeanManager.

If you want me to open an issue for the plugin I'll do.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200434#comment-13200434 ] 

Maurizio Cucchiara commented on WW-3751:
----------------------------------------

In such case I'll take a deeper look at this during this weekend.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202579#comment-13202579 ] 

Maurizio Cucchiara commented on WW-3751:
----------------------------------------

Ciao Marco,
I have just tried the example you provided and I can confirm the presence of the issue on Glassfish (apropos, thank you for the accurate and clear test case).
At the same time, I have to say you that the error does not occur under Tomcat neither under Jetty (which would make me think that this is a Glassfish issue).
Under both the application servers, the tenured gen memory has never exceeded 20MB in size (though Jetty is much slower than Tomcat). 

I'm trying to understand what really differs from Glassfish and I'll ping you back.

                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203730#comment-13203730 ] 

Maurizio Cucchiara commented on WW-3751:
----------------------------------------

Ciao Marco,
finally I found the [culprit|http://java.net/jira/browse/GLASSFISH-8601].
What really differs between Tomcat and Glassfish is the jsp implementation. In fact, according with the Glassfish docs the pool is disabled by default, whereas Tomcat [enables it by default|http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html].
Although this is not within my sphere of competence, I guess that if you set the system property "org.apache.jasper.runtime.JspFactoryImpl.USE_POOL" to true it should be work at the same way of Tomcat.
I will try to find out what is holding the JspFactoryImpl/JspWriterImpl
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Updated] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Marco Malavolta (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Malavolta updated WW-3751:
--------------------------------

    Attachment: testproject.zip
    
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202591#comment-13202591 ] 

Maurizio Cucchiara commented on WW-3751:
----------------------------------------

Another thing that I can confirm is that Tomcat reuses the same instances of PageContextImpl and consequently PageContextImpl.
Glassfish doesn't.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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

        

[jira] [Commented] (WW-3751) Memory leak using jsp tags on an app deployed on glassfish

Posted by "Johannes Geppert (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217414#comment-13217414 ] 

Johannes Geppert commented on WW-3751:
--------------------------------------

{quote}
The strut2 cdi plugin does not work because it searches the beanManager with those keys: "java:comp/BeanManager" and "java:app/BeanManager".
Tomcat only allows to bind entries to java:comp/env, so the BeanManager is available at java:comp/env/BeanManager.
{quote}

Please open an separate Issue for this Problem.
                
> Memory leak using jsp tags on an app deployed on glassfish
> ----------------------------------------------------------
>
>                 Key: WW-3751
>                 URL: https://issues.apache.org/jira/browse/WW-3751
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.1, 2.2.1.1, 2.2.3, 2.3.1, 2.3.1.1
>         Environment: Windows 7 Professional (Microsoft Windows version 6.1 Build 7601:Service Pack 1) 64 bit
> Processor: Intel Core i5 CPU 650 @ 3.20GHz 3.33 Ghz
> Ram: 6.00 GB
> GlassFish Server Open Source Edition 3.1.1 (build 12).
> It also happens in production environment with different hardware configuration running Linux
>            Reporter: Marco Malavolta
>         Attachments: screenshot-1 - VisualVM.jpg, testproject.zip
>
>
> I have some webapps based on Struts 2 framework.
> I use JSP tags, even sometimes with nested Struts 2 tag (FreeMarker).
> Every time you call with a single jsp jsp tags JspWriterImp a new instance is created with more or less the contents of the tag (instead of reusing the same object stored in memory.
> This causes a loss of memory, because these objects are located in the old generation heap 'til the web application is restarted
> After a few days / weeks depending on the traffic that you need to restart because of irresponsiveness.
> I also created a Jira issue on GlassFish (http://java.net/jira/browse/GLASSFISH-18316), where I posted a screenshot and a sample application to reproduce the problem.
> Basically I'm not sure if it's a struts problem or a problem of glass fish.
> Perhaps the second hypothesis is more likely
> Feel free to close it if you feel that the problem is solely related to Glassfish

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