3

I have a DSpace server, after uprading from version 4.3 to 5.1, it constantly stops working after some hours with following error:

java.lang.OutOfMemoryError: Java heap space

I've read answers to the same questions, but they didn't help me.

My JAVA_OPTS: -Xmx4096M -Xms4096M -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8

Here are my logs:

I searched the internet for a solution and could not find one, does any one have a clue?

trincot
  • 317,000
  • 35
  • 244
  • 286
Eugene
  • 33
  • 3
  • Configure the JVM to drop a head dump on OOM and then inspect that dump for likely suspects. Use that, and the source, to try and figure out if there is a leak or an inefficient use of heap. –  Apr 21 '15 at 18:10
  • 1
    That is a significant allocation for a DSpace instance. Can you confirm that tomcat is actually using the allocation that you have assigned? – terrywb Apr 21 '15 at 18:34

1 Answers1

0

Your tomcat log file quite clearly says that it isn't using the JAVA_OPTS you're passing in:

INFO: Command line argument: -Xmx256m

In my experience, DSpace 5 needs at least 512MB; your 4GB look a little excessive unless your DSpace instance is very big / gets lots of traffic.

You aren't telling us what operating system you're using, so it's hard to give advice on how where to set these properly. Start with your tomcat startup script and/or the tomcat configuration files. On my Red Hat Enterprise Linux 6.6 boxes (with tomcat6), the correct place for the memory settings is /etc/tomcat6/tomcat6.conf.

schweerelos
  • 2,189
  • 2
  • 17
  • 25
  • I think the relevant number is in the max heap setting `-Xmx256m` rather than the starting heap size, but same issue. – clstrfsck Apr 22 '15 at 00:09
  • Oh, thanks a lot, it really should be configured in tomcat's service properties (Windows OS)... I hope this will help. – Eugene Apr 22 '15 at 00:30
  • @msandiford yeah I saw after posting that I picked out -Xms when I should have picked out -Xmx, but either shows that the JAVA_OPTS aren't used. – schweerelos Apr 22 '15 at 03:49
  • @Eugene if this fixes your problem, would you mind accepting my answer? – schweerelos Apr 22 '15 at 03:49