0

Actually i am running Wowza Media Server on CentOS v6.3 64-bit Linux. Then it used to be suddenly stopped in some days and whenever i check the logs, i always see:

java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

If i have to increase the memory rooms for Java:

  • how can i simply do it please?
  • have 72GB in my Dedicated Server, and 60GB is always free, can i give all 60GB to Java like that please?
trincot
  • 317,000
  • 35
  • 244
  • 286
夏期劇場
  • 17,821
  • 44
  • 135
  • 217

2 Answers2

1

You can change the amount of memory allocated for use by your JVM using the -Xms and -Xmx command line parameters.

Hassi
  • 120
  • 8
1

You can adjust memory usage by setting up -Xms and Xmx parameters in setenv.sh file of Wowza under the bin directory.

ikikenis
  • 340
  • 1
  • 7
  • How MUCH should i (or) can i give up to, please? (since as i mentioned, i have 60GB free). And also, the file seems a bit difficult to understand. At which particular place do i need to modify, please? – 夏期劇場 Dec 05 '13 at 08:59
  • The answer to "How much" is really depends on your system and usage. You can experiment it by monitoring system for a while. (There might be a guide about it in Wowza docs, I'm not too sure). There's a line in my setenv.sh file as `JAVA_OPTS="-server -Xmx1200M"` which sets maximum memory usage as 1200MB. You can look for a similiar line and edit it. – ikikenis Dec 05 '13 at 09:25
  • @シリウス HotSpot's default, without -Xmx, is just 1 GB, so increase this to 8 GB for a start. – Marko Topolnik Dec 05 '13 at 09:27
  • Isn't the default maximum for a 64 bits server VM dependent on the total memory available nowadays? In any case given the problem description I would suspect a memory leak in this media server application. – Gimby Dec 05 '13 at 10:56