On Fri, Mar 25, 2011 at 7:13 PM, Hiranya Jayathilaka <[email protected]>wrote:
> I guess if the code actually has any memory leaks, tuning the JVM and GC > will not fully solve the problem. Tuning will certainly help by reducing the > probability of the server running out of memory, and in some cases delay the > problem from happening (as Pradeep and Sameera have experienced). But I > don't think it will ever fully 'solve' the problem. Memory usage will > increase over time and the server will run out of memory eventually. The problem we were seeing was classes not getting unloaded. -XX:+CMSClassUnloadingEnabled combined with reasonable values for other params makes the GC unload classes. > > Thanks, > Hiranya > > On Fri, Mar 25, 2011 at 7:03 PM, Sameera Jayasoma <[email protected]>wrote: > >> I tried this on my machine. Restarted WSO2Carbon around 12 times. I got >> the following permgen issue. >> >> Exception in thread "State Saver" java.lang.OutOfMemoryError: PermGen >> space >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:621) >> at >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) >> at java.net.URLClassLoader.access$000(URLClassLoader.java:56) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> ..................... >> >> Here are the details of Machine and JVM >> >> Linux sameera-xps 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC >> 2009 x86_64 GNU/Linux >> >> java version "1.6.0_13" >> Java(TM) SE Runtime Environment (build 1.6.0_13-b03) >> Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) >> >> Also I'v used the following JVM parameters >> >> -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -d64 >> -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:-UseGCOverheadLimit >> -XX:+CMSClassUnloadingEnabled -server >> >> Sameera >> >> >> >> >> On Fri, Mar 25, 2011 at 6:55 PM, Afkham Azeez <[email protected]> wrote: >> >>> Guys, >>> Can some folks check this out on different OSs and let us know whether >>> this works? On my Mac, it has been working without any issues. >>> >>> >>> On Fri, Mar 25, 2011 at 6:08 PM, Afkham Azeez <[email protected]> wrote: >>> >>>> So, another thing I observed is, when the MacPermSize becomes larger, >>>> the number of GC runs on PermGen space increases, and classes get unloaded >>>> more frequently, thereby decreasing the possibility of running out of >>>> PermGen space. >>>> >>>> >>>> On Fri, Mar 25, 2011 at 6:03 PM, Afkham Azeez <[email protected]> wrote: >>>> >>>>> 256m may not be sufficient. Can you try with 512? >>>>> >>>>> >>>>> On Fri, Mar 25, 2011 at 5:17 PM, Pradeep Fernando <[email protected]>wrote: >>>>> >>>>>> hi, >>>>>> >>>>>> after setting -XX:PermSize=128m -XX:MaxPermSize=256m. the class >>>>>> unloading and GC on permgen space seems to be happening. However after >>>>>> ~8 the server crashes. >>>>>> >>>>>> --Pradeep >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Afkham Azeez* >>>>> Senior Software Architect & Senior Manager; WSO2, Inc.; >>>>> http://wso2.com, >>>>> * >>>>> * >>>>> *Member; Apache Software Foundation; >>>>> **http://www.apache.org/*<http://www.apache.org/> >>>>> * >>>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>>>> twitter: >>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>>>> * >>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>>>> * >>>>> * >>>>> *Lean . Enterprise . Middleware* >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Afkham Azeez* >>>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com >>>> , >>>> * >>>> * >>>> *Member; Apache Software Foundation; >>>> **http://www.apache.org/*<http://www.apache.org/> >>>> * >>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>>> twitter: >>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>>> * >>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>>> * >>>> * >>>> *Lean . Enterprise . Middleware* >>>> >>>> >>> >>> >>> -- >>> *Afkham Azeez* >>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com >>> , >>> * >>> * >>> *Member; Apache Software Foundation; >>> **http://www.apache.org/*<http://www.apache.org/> >>> * >>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>> * >>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>> * >>> * >>> *Lean . Enterprise . Middleware* >>> >>> >>> _______________________________________________ >>> Carbon-dev mailing list >>> [email protected] >>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>> >>> >> >> >> -- >> Sameera Jayasoma >> Technical Lead and Product Manager, WSO2 Carbon >> >> WSO2, Inc. (http://wso2.com) >> email: [email protected] >> blog: http://tech.jayasoma.org >> >> Lean . Enterprise . Middleware >> >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > > -- > Hiranya Jayathilaka > Senior Software Engineer; > WSO2 Inc.; http://wso2.org > E-mail: [email protected]; Mobile: +94 77 633 3491 > Blog: http://techfeast-hiranya.blogspot.com > > _______________________________________________ > Carbon-dev mailing list > [email protected] > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- *Afkham Azeez* Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com, * * *Member; Apache Software Foundation; **http://www.apache.org/*<http://www.apache.org/> * email: **[email protected]* <[email protected]>* cell: +94 77 3320919 blog: **http://blog.afkham.org* <http://blog.afkham.org>* twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> * linked-in: **http://lk.linkedin.com/in/afkhamazeez* * * *Lean . Enterprise . Middleware*
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
