Glassfish Permgen Space Error
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about glassfish increase heap size hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask java.lang.outofmemoryerror: permgen space Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. jprofiler Join them; it only takes a minute: Sign up How to get rid of PermGen space? up vote 2 down vote favorite 2 I am fed up with the following annoying error, how can I get it solved ? would it solve the problem if I use Tomcat rather than GlassFish? I am running locally, would it be the same if I run the same application on the server? SEVERE: java.lang.OutOfMemoryError: PermGen space SEVERE: Exception in module org.glassfish.main.core.kernel [228] : java.lang.OutOfMemoryError: PermGen space SEVERE: Exception in module org.glassfish.main.core.kernel [228] : java.lang.RuntimeException: java.lang.OutOfMemoryError: PermGen space SEVERE: Exception in thread "RMI RenewClean-[10.0.0.12:8686]" java java-ee tomcat glassfish share|improve this question asked Aug 16 '13 at 1:03 Tim Norman 151426 We need more details, especially the JVM arguments. –hexafraction Aug 16 '13 at 1:04 I am newbie to Glassfish where can I find those arguments? –Tim Norman Aug 16 '13 at 1:06 1 If you redeploy your app without restart your server this error will occur in some moment, because the container maintains the old copy of your application. It's a known issue: wiki.apache.org/tomcat/OutOfMemory –Badaro Aug 16 '13 at 2:03 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted Anytime you are redeploying the application need to restart the server to clean up its memory, as I have a similar issue with Tomcat. Changing memory size just delay the problem but would not prevent it. In addition, need to find memory leaks of your application using plugins of your IDE such as Profiler for netbeans or other available software. Moreover, as Shaunak said you can change the size of perm memory in /glassfish/domain/domain1/config/domain.xml file. share|improve this answer edited Nov 21 '13 at 6:00 answered Aug 16 '13 at 5:40 J888 43042256 add a comment| up vote 6 down vote Have you tried increasing the memory for glassfish? 1) goto "domain.xml" in /glassfish/domain/domain1/config look for
Tuning You can address any of currently faced or anticipated performance issues by doing performance tuning for the following: Database Application Server Thread Pools MySQL Database Connections Clustering Memory Properties File Changes Servlet Filters Portlets Java Environment Portal Extensions Database If you are using the MySQL database, you need to configure the my.cnf file. The following are some of the important variables in the my.cnf file. query_cache_size In a situation where the database has to repeatedly run the same queries on the http://stackoverflow.com/questions/18264243/how-to-get-rid-of-permgen-space same data set, returning the same results each time, MySQL can cache the result set, avoiding the overhead of running through the data over and over and is extremely helpful on busy servers. key_buffer_size The value of key_buffer_size is the size of the buffer used with indexes. The larger the buffer, the faster the SQL https://docs.oracle.com/cd/E19316-01/820-7054/ghlyt/index.html command finishes and a result is returned. The rule-of-thumb is to set the key_buffer_size to at least a quarter, but no more than half, of the total amount of memory on the server. Ideally, it will be large enough to contain all the indexes (the total size of all .MYI files on the server). A simple way to check the actual performance of the buffer is to examine four additional variables: key_read_requests, key_reads, key_write_requests, and key_writes. If you divide the value of key_read by the value of key_reads_requests, the result should be less than 0.01. Also, if you divide the value of key_write by the value of key_writes_requests, the result should be less than 1. table_cache The default is 64. Each time MySQL accesses a table, it places it in the cache. If the system accesses many tables, it is faster to have these in the cache. MySQL, being multi-threaded, may be running many queries on a table at a time, and each
linux, it is located under /usr/share/glassfish3/glassfish/domains/domain1/config (in windows C:\glassfish3\glassfish\domains\domain1\config) There are two configs in domain.xml, server-config and https://madvens.wordpress.com/2013/07/31/glassfish-permgen-space-error/ default-config. Search for "-XX:MaxPermSize=" in server-config and set its value https://netbeans.org/bugzilla/show_bug.cgi?id=171947 to 256m or higher. (i.e.
compiles GlassFish fired an OutOfMemoryError error Summary: After about 30 compiles GlassFish fired an OutOfMemoryError error Status: RESOLVED INVALID Product: serverplugins Classification: Unclassified Component: GlassFish Version: 6.x Hardware: All Windows XP Priority: P2 (vote) TargetMilestone: TBD Assigned To: Vince Kraemer QA Contact: issues@serverplugins URL: Whiteboard: Keywords: Duplicates: 165341 (view as bug list) Depends on: Blocks: Show dependency tree /graph Reported: 2009-09-10 15:59 UTC by masha Modified: 2009-09-17 19:59 UTC (History) CC List: 2 users (show) phejl pjiricka See Also: Issue Type: DEFECT Exception Report : Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description masha 2009-09-10 15:59:08 UTC After about 30 compiles GlassFish fired an OutOfMemoryError error. I dint't changed application.xml before this error appeared, as is said on forum, just recompiled for many times (have changed code) StandardWrapperValve[RemoteJmxConnectorServlet]: PWC1406: Servlet.service() for servlet RemoteJmxConnectorServlet threw exception java.lang.OutOfMemoryError: PermGen space PWC3989: An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError: PermGen space PWC3989: An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError: PermGen space PWC3989: An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError: PermGen space PWC3989: An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError: PermGen space StandardWrapperValve[RemoteJmxConnectorServlet]: PWC1406: Servlet.service() for servlet RemoteJmxConnectorServlet threw exception java.lang.OutOfMemoryError: PermGen space WEB0756: Caught exception during HTTP processing. java.lang.OutOfMemoryError: PermGen space StandardWrapperValve[RemoteJmxConnectorServlet]: PWC1406: Servlet.service() for servlet RemoteJmxConnectorServlet threw exception java.lang.OutOfMemoryError: PermGen space Comment 1 masha 2009-09-10 16:45:47 UTC Heavy system! Reboot of IDE didn't helped. I have had to reboot the whole computer! :D Comment 2 Peter Pis 2009-09-11 08:26:47 UTC Reassigning. Comme