Cachiusa, PermGen is a seperate area of memory from the heap, set aside by the JVM to store 'permanent' information like class information and string literals.
(Such information is always resident for the duration of the ClassLoader that created/loaded it - in a container environment like Tomact, those ClassLoaders may not actually live for the entire duration of the application server [you can unload a web application], in which case that 'permanent' information should be garbage collected). The default size for the permanent generation is only 64M. You can increase this by using the JVM parameter (add to JAVA_OPTS): -XX:MaxPermSize=256m Note that it is not sufficient to just increase the space so that the web applications load initially. Due to the on demand loading of classes, etc. permanent generation space will continue to be used up as you exercise more of the application. (You may have been able to open 12 instances in your current configuration - I can pretty much guarantee that you won't be able to fully utilise all of them) IIRC, you'll need to set aside at least 20MB for each instance with the JSP interface, and 50MB for each with the XML/Manakin interface. This is assuming that you don't remove the commons-dbcp / commons-pool / postgres jars from each instance, and only have them at the common layer. Doing that would save in the region of 8MB per instance. If you try to split across multiple Tomcat's then you will have the added overhead of each JVM and Tomcat information. If you split across multiple virtual machines, then you have the overhead of each VM, each OS, each JVM and each Tomcat! Increasing the PermGen to the point where all your instances can run is your best chance of getting all 24 instances to run on a single physical machine. Although ideally you would want it to be a 64-bit machine, a 64-bit JVM, and at least 8Gb installed in the machine. G cachiusa wrote: > Dear all, > I am looking for solution for 24 Dspace for 24 communities run on 1 server. > Which solution I should choose: > > 1) 24 instances of Tomcat, one for each Dspace instance, or > 2) One Tomcat for 24 Dspace instances. > > I choose second solution by following the link > http://www.nabble.com/Changing-DB-Name-%C2%BFhow--td19053520.html > and already finished installation. But my server is broken if I try to > access 24 DSpace at the same time (it is ok to open 12 Dspace). > > Some sites show error: > java.lang.OutOfMemoryError: PermGen space > > The others return errors: > java.io.FileNotFoundException: > /usr/local/gmseenet/partners/gmseenet/dspace/webapps/jspui/WEB-INF/web.xml > (Too many open files) > > or: > org.apache.jasper.JasperException: Unable to compile class for JSP > > I already set heap memory for Tomcat to 2048 by > JAVA_OPTS="-Xmx2048M -Xms64M -Dfile.encoding=UTF-8", but I still face the > same problem. > > Quick checking on internet tells me the problem is "garbage collection" of > Java class: > http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java. > > I have to run 24 DSpace in 1 machine, so what is solution for me? > Please help me. Thanks in advance. > Best, > Cachiusa This email has been scanned by Postini. For more information please visit http://www.postini.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

