Graal PermGem erreur
J'ai besoin d'aide avec ce problème. J'ai besoin de quelqu'un pour m'expliquer pourquoi est-ce qui se passe et comment les prévenir ou les éviter.
Exception in thread "Thread-747" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-748" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-759" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-760" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-764" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-765" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-766" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-767" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-773" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-774" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-780" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-781" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-788" java.lang.OutOfMemoryError: PermGen space
Exception in thread "Thread-789" java.lang.OutOfMemoryError: PermGen space
2011-06-20 14:42:10,668 [http-8080-6] ERROR [/CM].[grails] - Servlet.service() for servlet grails threw exception
java.lang.OutOfMemoryError: PermGen space
2011-06-20 14:42:10,668 [http-8080-6] ERROR [/CM].[default] - Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: PermGen space
: java.lang.OutOfMemoryError: PermGen space
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
at _GrailsPackage_groovy$_run_closure8.doCall(_GrailsPackage_groovy:275)
at _GrailsPackage_groovy$_run_closure8.call(_GrailsPackage_groovy)
at _GrailsRun_groovy$_run_closure8.doCall(_GrailsRun_groovy:245)
at RunApp$_run_closure1.doCall(RunApp.groovy:35)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: java.lang.OutOfMemoryError: PermGen space
--- Nested Exception ---
java.lang.OutOfMemoryError: PermGen space
Error automatically restarting container: java.lang.OutOfMemoryError: PermGen space
Error executing script RunApp: PermGen space
java.lang.OutOfMemoryError: PermGen space
Error executing script RunApp: PermGen space
Application context shutting down...
Application context shutdown.
La mémoire des paramètres utilisez-vous pour votre Graal application? La norme 64M pour la permGen space n'est pas assez pour le graal de l'app.
OriginalL'auteur John22_2 | 2011-06-20
Vous devez vous connecter pour publier un commentaire.
La PermGen est une région de votre JVM de la mémoire qui est utilisée pour charger des classes.
Comme vous l'application s'exécute, il utilise de plus en plus et de la mémoire, surtout si vous êtes dans un environnement de débogage, si vous faire un large usage de fermetures.
Le moyen de résoudre ce problème est d'ajouter plus de!
Cela se fait en passant un ou deux paramètres de la JVM au moment du lancement de votre application.
Les paramètres sont les suivants :
(régler les valeurs de vos besoins spécifiques)
La PermSize sera la taille initiale de la PermGen, et la MaxPermSize sera la taille maximale à laquelle il va augmenter avant de vous jeter une exception comme dans votre post.
Par défaut, il est fixé à
64M
, ce qui n'est pas beaucoup si vous avez un 'vrai' application.ATTENTION : Votre
total memory usage
sera:Heap size + Perm Size
OriginalL'auteur Vincent Giguère
Si vous utilisez Servlet Version 3.0 alors même augmenter votre mémoire n'est pas être d'aucun secours, puisque c'est un problème avec le groovy compilateur. La nouvelle version 1.8.2/1.9 (?) qui sera publié prochainement va résoudre ce problème. En attendant, vous pouvez modifier la servlet version "2.5" (dans BuildConfig.groovy) qui permettra de résoudre ce problème.
L'inconvénient de l'évolution de la servlet version 2.5 est qu'il ne peut pas être déployé à l'application Glassfish server, de sorte que le laid solution est le changement de 2,5 et utiliser "run-app". Lorsque vous souhaitez déployer pour glassfish changer la servlet version "3.0" dans BuildConfig.groovy, exécutez la "guerre" et puis déployer la guerre de Glassfish.
Revenir à "2.5" à courir local dev machine à nouveau.
OriginalL'auteur Ganesh Krishnan
Consultez la FAQ
Q: OMG je obtenir OutOfMemoryErrors ou PermGen Space erreurs lors de l'exécution de Graal, le mode de développement. Que dois-je faire?
Plus facile juste pour redémarrer votre serveur d'application quand il arrive.
OriginalL'auteur artbristol
Dans les STS IDE par la suite:
-XX:MaxPermSize=512m -XX:PermSize=128m
J'espère que cela aide.
OriginalL'auteur Bhuwan Gautam