Tomcat out of memory error permgen space

Saturday, 30 June 2012 0 comments

How to fix tomcat out of memory error permgen space,Tomcat config,tomcat permgen error, tomcat problem when start.

when start the tomcat the application not up and the logs show error like out of memory error permgen space how to solve the memory problem.

for this problem just allocate more memory for ur application and mention that is tomcat.the configuration steps are given below.

  • open the setclasspath.sh file in text editor.
  • it is placed in apache-tomcat/bin/setclasspath.sh
  • then find the $JAVA_ENDORSED_DIRS in the setclasspath file
  • paste the following code JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m" on the if condtion.
before memory allocation,

        # Don't override the endorsed dir if the user has set it previously
        if [ -z "$JAVA_ENDORSED_DIRS" ]; then
               # Set the default -Djava.endorsed.dirs argument
               JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
        fi

after memory allocation,

        # Don't override the endorsed dir if the user has set it previously
        if [ -z "$JAVA_ENDORSED_DIRS" ]; then
               # Set the default -Djava.endorsed.dirs argument
               JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
               JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m"
        fi

  • increase MaxPermSize memory size based on the application reqirement
                   JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m"

Thank you,hope it's help you guys.


Solution of Eclipse Hanging

Monday, 28 May 2012 0 comments

Eclipse hang while startup, my eclipse is very slow, how to avoid eclipse hanging, eclipse always slow


developers always worried for hanging of eclipse and wasting the time to search how to avoid the eclipse hanging.basically eclipse hang in different reasons so here i give some solutions for reduce eclipse hanging upto my knowledge.

what to do if the eclipse hang while start up
for this u need to delete the .snap file located in ur workspace folder
workspace->.metadata->org.eclipse.core.resources->.snap or inside the project folder .snap file u have to delete

what to do if the eclipse hang frequently
this is because of memory issue so u need to allocate more memory for eclipse.
open eclipse.ini file in eclipse folder
u see the memory allocation of eclipse there like follows
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms128m
-Xmx512m
here u need to increase the memory size based on ur RAM memory example if its 4GB then allocate like follows
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=512m
-Xms256m
-Xmx1024m


still its slow then do some more steps for speed up eclipse
open the preference in eclipse and give the vm arguments value
window-->preference -->java-->install jre
select the installed jre and click edit then in tha Default Vm Arguments field you need to give like follow
-Xmx1024M
again,
open eclipse.ini file and place the following line to speed up eclipse
-Xverify:none

one more,
just remove unwanted validations for eclipse
window-->preference --> validation and unmark unwanted validations

hope this is help for you and write comments for more updates.