I'm running a geonetwork 3.0.1 instance on tomcat7. Regularly, i.e. every few actions of my only user, my tomcat runs into a
PermGenSpace error. This especially occurs during harvesting of other catalogues.
I already configured geonetwork to use Postgres (postgres.xml). Then I adapted
/ect/default/tomcat7 and set in the
-Xms=1024m -XmX=2048m -XX:MaxPermSize=2048m. If I get it right, that should be the maximum tolerable values, as my server runs on 4GB RAM. Actually I am not sure, if those values are actually applied by the JVM, as I could not prove it with memory monitoring.
As the latest configuration improvement, I set the geonetwork_data_dir outside the tomcat webapp path. Since then, it seems to behave a bit improved, but I am still affected by this tiring
Are there best practice experiences, which values to use, especially for
Are there suggestions, what else to enhance in the configuration?
I changed my server configuration and run with 6GB now. Other reconfiguration has been changing the JAVA_OPTS to
JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseParNewGC -XX:NewRatio=2 -XX:+AggressiveOpts -Xrs -XX:PerfDataSamplingInterval=500 -XX:MaxPermSize=256m"
The out of memory errors disappeared until now, after a few tests. Also harvesting a remote CSW ran quickly and without disruption.
So in general I can run geonetwork with the 1GB heap and 256 Perm space as proposed in the accepted answer now.