• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet.service() for servlet action threw exception java.lang.OutOfMemoryError: PermGen space

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am working on a web application developed in struts 1.2 framework. I am getting the error when i am redeploying the application:

Servlet.service() for servlet action threw exception java.lang.OutOfMemoryError: PermGen space

I have goggled but found solution to increase the memory size this not solves the problem but postponed the error.

Please tell me what may be the reason for getting this error and how to solve this permanently.

Thank you.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just restart the server... to resolve the error permanently just increase JVM
 
Mohit Kumar Tayal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi gokul,

i have tried this by increasing the size of jvm.

but is it the only way to postpone the problem.

please tell me why this problem comes and when this is going to happen.
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The TomcatFaq discusses this issue.
 
Mohit Kumar Tayal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i found one solution something saying this:

-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled and -XX:+UseConcMarkSweepGC

but i am not getting where to change for this means how to get effect with these lines.

And also please tell me is this the right way to solve the problem.

 
gokul subramanian
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mohit Kumar Tayal ,
can i know which ide are you using....
 
Mohit Kumar Tayal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi gokul,

I am using MyEclipse but the problem comes after deploying the application on live servers after 3-4 days on restarting the application not on my development system.

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can increase the size of the PermGen space. This will buy you time between occurrences, not fix the problem as Gokul states.
Follow Lester's link. This problem has to do with how the classloader works. There is no workaround that I have seen.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic