0

Memeory Rlease issue with ZK on JBoss 4.3

asked 2010-02-09 03:34:20 +0800

Willemvdw gravatar image Willemvdw
39

We are using ZK 3.6 on jboss 4.3 with Rest Easy (Jboss).. Our Memory consumption is being increased gradully and it never comes down...
We are Using RHEL 4 32 bit machine...JDk 6...I have tried to find the memory heap information using JProfiler...Not getting clear data...

Please share some thoughts on this...we have used all combination of Java Opts setting...Even Hugedata demo application of the community is also taking memory in Jboss stack...

Thanks,
Willem

delete flag offensive retag edit

21 Replies

Sort by ยป oldest newest

answered 2010-02-09 04:35:00 +0800

iantsai gravatar image iantsai
2755 1

I think the first step here is to identify which part of your application cause the problem.

You need to do an architecture review.

any cache module, Sessions, static Collections and Singleton member fields should be analyzed.

without this, there's noway for tools to dig out the issue.

link publish delete flag offensive edit

answered 2010-02-10 08:37:09 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

updated 2010-02-10 08:38:16 +0800

Hi Willemvdw,

ZK has a serious memory leak when you redeploy WAR, see http://www.zkoss.org/forum/listComment/10270

link publish delete flag offensive edit

answered 2010-03-04 04:39:05 +0800

Willemvdw gravatar image Willemvdw
39

This is more details about my finding..probably people can advice me on basis of this..

I ran JBoss through JProfiler total memory is 2 gb ..
i ran a load test of 50 users for 30 mintues.. CPU and memory has gone to upper limits and server stops responding upto 1 hour..GC interval is 30 mintues..


Our ZK Application uses mostlly Grid, Tab, List (It is being poplated by List Render )and Label
This is brief details of top objects that occupies the most memory from Jprofile GUI screen

char[]: 491 mb
Java.lang.String: 210 mb
init[]: 168 MB
bsh.token: 90 mb
byte[]: 90 mb
zul.listcell: 80 mb
hasmap$entry: 50 mb
hashmap 35 mb
object[] 35 mb
CourseBean: 32 MB our custom java Class ...this been use to populate the list object
bsh:node[] 20 mb
BSHPrimaryExpression 15 mb
BSHAmbigiousName 15 mb
zk.ui.AbstractComponent$ch... 12 mb

so subsequntlly other object that occupies the memory related with ZK classs, our custom class and bsh object..

link publish delete flag offensive edit

answered 2010-03-04 05:10:26 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Do you experience these problems only when you redeploy your app? Redeploy means undeploy and deploy. See my comment above or see http://xmedeko.blogspot.com/2010/02/java-web-container-hunting-redeploy.html

If not, then you should be able to easily find the root of your leak by JProfiler or Eclipse Memory Analyzer (MAT). Just take a suspected leak object and follow the path to the root GC without weak and soft references.

link publish delete flag offensive edit

answered 2010-03-04 05:14:44 +0800

Willemvdw gravatar image Willemvdw
39

This posting is talking about the BSH jar...that cuses memory leak
http://sourceforge.net/tracker/index.php?func=detail&aid=1736858&group_id=152762&atid=785191
I have also implemented that and checked the memory status..

This is the finiding..

with fixed jar, 50 user 30 mintues... Jboss has recollected the memory and has come back to its prestatus aftre 60 mintues..
with not fixed jar , 50 user 30 mintues locad, Jboss has recollected partial memory aftre 80 mintues...
now replicating same schenario and checking whether it is consistent behaviour or not..

link publish delete flag offensive edit

answered 2010-03-04 05:18:31 +0800

Willemvdw gravatar image Willemvdw
39

Thanks for your quick response
No, this is not at all related with redeploy or deploy problem..

link publish delete flag offensive edit

answered 2010-03-04 08:42:29 +0800

Willemvdw gravatar image Willemvdw
39

My Finding is when load is very extreme let us say 50 concurrent user for long time for an hour, server stops responding...and outofmemory Error occurs..otherwise if load is moderate server goes up and comes down at ceratin interval..that bsh.jar related fixes has no implication... please advice

link publish delete flag offensive edit

answered 2010-03-04 10:38:53 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Probably it is not a leak. Looks like you have too many of listcells. How long lists do you generate? If you have very long lists, try paging. Even if you use "live" list model, then it keeps all list items in the memory, when the user scrolls down the whole list down.

link publish delete flag offensive edit

answered 2010-03-04 22:30:15 +0800

Willemvdw gravatar image Willemvdw
39

we using paging...

link publish delete flag offensive edit

answered 2010-03-05 02:25:03 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

And does your implementation of paging release the unused listitems properly?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-09 03:34:20 +0800

Seen: 1,069 times

Last updated: Mar 09 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More