Fast Memory Leak
romain.dev.easycity.com Aug 9, 2011 11:28 AMHi guys,
I have a fast memory leak with my application using Seam 2.2.1.GA and JBoss 4.3.2.GA.
The free memory on my server is going down until 0 in approximately 2hours. Here is the output when I do a jmap :
ns302166:~# jmap -histo -F 18914 | grep com.easycity Attaching to process ID 18914, please wait... Debugger attached successfully. Server compiler detected. JVM version is 11.2-b01 Iterating over heap. This may take a while... Finding object size using Printezis bits and skipping over... 1387920 17349 com.easycity.entity.i18n.CategoryDetails 291840 570 com.easycity.ejb.pages.localsearch.PoiInfoManagerBean 287856 5997 com.easycity.entity.i18n.ECLocale 239880 5997 com.easycity.entity.i18n.Lang 205288 383 com.easycity.entity.core.poi.LocalBusiness 199728 438 com.easycity.entity.community.Mb 197888 1546 com.easycity.entity.core.poi.Category 142448 614 com.easycity.entity.i18n.POIDetails 140200 701 com.easycity.ejb.AppIdentity_$$_javassist_seam_2 134592 701 com.easycity.ejb.AppIdentity 99360 621 com.easycity.entity.utils.embedded.NavstPOI 80800 505 com.easycity.entity.utils.embedded.LocalBusinessSales 77280 420 com.easycity.entity.utils.embedded.FacebookUserData 68640 390 com.easycity.ejb.pages.UniversalSearchManagerBean 64416 732 com.easycity.entity.utils.Comment 58384 82 com.easycity.ejb.util.PropertiesManagerBean 57536 124 com.easycity.entity.core.poi.AppPOI 42152 479 com.easycity.entity.utils.embedded.MbStats 41664 651 com.easycity.entity.utils.embedded.PoiStats 41664 651 com.easycity.entity.utils.embedded.Address 41664 651 com.easycity.entity.utils.embedded.PoiGoogleStreetViewData 36256 412 com.easycity.entity.i18n.Country 34464 359 com.easycity.entity.core.poi.Revision 28800 400 com.easycity.entity.i18n.City 25560 213 com.easycity.entity.community.Review 23112 107 com.easycity.entity.utils.embedded.TwitterUserData 21888 171 com.easycity.entity.utils.embedded.NavstCountry
If I run jmap again 1 minute later, more instances of each class and more space are used :
ns302166:~# jmap -histo -F 18914 | grep com.easycity Attaching to process ID 18914, please wait... Debugger attached successfully. Server compiler detected. JVM version is 11.2-b01 Iterating over heap. This may take a while... Finding object size using Printezis bits and skipping over... 2172720 27159 com.easycity.entity.i18n.CategoryDetails 431520 8990 com.easycity.entity.i18n.ECLocale 366080 715 com.easycity.ejb.pages.localsearch.PoiInfoManagerBean 359600 8990 com.easycity.entity.i18n.Lang 326528 2551 com.easycity.entity.core.poi.Category 310880 580 com.easycity.entity.core.poi.LocalBusiness 252624 554 com.easycity.entity.community.Mb 208336 898 com.easycity.entity.i18n.POIDetails 188200 941 com.easycity.ejb.AppIdentity_$$_javassist_seam_2 180672 941 com.easycity.ejb.AppIdentity 148480 928 com.easycity.entity.utils.embedded.NavstPOI 120320 752 com.easycity.entity.utils.embedded.LocalBusinessSales 96968 527 com.easycity.entity.utils.embedded.FacebookUserData 96624 549 com.easycity.ejb.pages.UniversalSearchManagerBean 80736 174 com.easycity.entity.core.poi.AppPOI 67640 95 com.easycity.ejb.util.PropertiesManagerBean 64768 736 com.easycity.entity.utils.Comment 62272 973 com.easycity.entity.utils.embedded.PoiStats 62272 973 com.easycity.entity.utils.embedded.Address 62272 973 com.easycity.entity.utils.embedded.PoiGoogleStreetViewData 53152 604 com.easycity.entity.i18n.Country 52624 598 com.easycity.entity.utils.embedded.MbStats 48960 510 com.easycity.entity.core.poi.Revision 41256 573 com.easycity.entity.i18n.City 35040 292 com.easycity.entity.community.Review
The EJB related to my web pages are Stateful and Conversation scope with @Begin(join true) on my init function and no @End. Performances are very poor.
Please help me to find a solution and use seam as it should to prevent this. It hurts :-)
Romain
NB: com.easycity.ejb.pages.localsearch.PoiInfoManagerBean is an EJB ; com.easycity.entity.i18n.CategoryDetails is an entity bean.