# 2 issues : Java settings  and log files

**URL:** <https://community.wowza.com/t/2-issues-java-settings-and-log-files/37637>\
**Category:** Wowza Streaming Engine\
**Created:** [June 5, 2013, 1:29pm UTC](https://community.wowza.com/t/2-issues-java-settings-and-log-files/37637 "2013-06-05T13:29:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny\_Wilson](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@Danny\_Wilson](https://community.wowza.com/u/Danny_Wilson)\
**Post date:** [June 5, 2013, 1:29pm UTC](https://community.wowza.com/t/2-issues-java-settings-and-log-files/37637/1 "2013-06-05T13:29:56Z")

</div>

Hi, I’m working out of my area here, so apologies, for what might be a basic question.

**1: Java settings**

Our install of WMS will only run with the heap set at a max of 2500M

manually I get

```auto
-bash-4.1# ./startup.sh c
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

```

Or OK at 2500M

```auto
-bash-4.1# ./startup.sh c
Configure logging: file:///usr/local/WowzaMediaServer/conf/log4j.properties
INFO server server-start Wowza Media Server 3 Monthly Edition 3.5.2 build3747 -
INFO server comment - Server License Key: SVRM3-XXXXX-XXXXX-XXXXX-XXXXX-MAdwR
INFO server comment - Maximum Connections: Unlimited
INFO server comment - Transcoder Streams Available: Transcoder Not Available (linux-32)
INFO server comment - nDVR Available: Yes
INFO server comment - DRM Available: Yes
INFO server comment - Hardware Available Processors: 2
INFO server comment - Hardware Physical Memory: 3786MB/4049MB
INFO server comment - Hardware Swap Space: 8191MB/8191MB
INFO server comment - Max File Descriptor Count: 20000
INFO server comment - Open File Descriptor Count: 49
INFO server comment - OS Name: Linux
INFO server comment - OS Version: 2.6.32-358.2.1.el6.i686
INFO server comment - OS Architecture: i386
INFO server comment - Java Name: OpenJDK Server VM
INFO server comment - Java Vendor: Oracle Corporation
INFO server comment - Java Version: 1.7.0_19
INFO server comment - Java VM Version: 23.7-b01
INFO server comment - Java Spec Version: 1.7
INFO server comment - Java Home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19/jre
INFO server comment - Java Max Heap Size: 2222MB
INFO server comment - Java Architecture: 32
INFO server comment - Java Locale[user.language]: en
INFO server comment - Java Locale[user.country]: AU
INFO server comment - Java Locale[file.encoding]: UTF-8
INFO server comment - Java Timezone[user.timezone]: Australia/ACT
INFO server comment - Java Args[0]: -Xmx2500M
INFO server comment - Java Args[1]: -Djava.net.preferIPv4Stack=true
INFO server comment - Java Args[2]: -Dcom.sun.management.jmxremote=true
INFO server comment - Java Args[3]: -Dcom.wowza.wms.runmode=standalone
INFO server comment - Java Args[4]: -Dcom.wowza.wms.native.base=linux
INFO server comment - Java Args[5]: -Dcom.wowza.wms.AppHome=/usr/local/WowzaMediaServer
INFO server comment - Java Args[6]: -Dcom.wowza.wms.ConfigURL=
INFO server comment - Java Args[7]: -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaMediaServer
INFO server comment - Server runmode: standalone
INFO server comment - Server native.platform: linux
INFO server comment - Server threads[h/t]: 10/10
INFO server comment - CMDInterface now listening: [any]:8083
INFO vhost vhost-start _defaultVHost_ -
INFO server comment - _defaultVHost_ threads[h/t]:120/80 home:/usr/local/WowzaMediaServer
INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)
INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)
INFO vhost comment _defaultVHost_ Bind attempt ([any]:443:4)
INFO vhost comment _defaultVHost_ Bind successful ([any]:443)
INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:1)
INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
INFO server comment - Server.startShutdownHook: Start server shutdown hook
INFO server comment - Wowza Media Server is started!

```

So I’m looking at support and the above, is this failing because it’s 32-bit, should I be setting java at a max of 1800M?

**2. Log files**

We’ve also had problems with servers running of disk space. And found the folder with all the wowza logs to be the problem, I just deleted one with 3Gb of logs.

Is there a way to automatically clear old logs? Either that or it’s manually clearing them or turning them off?

Thanks,

Danny.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [June 5, 2013, 8:48am UTC](https://community.wowza.com/t/2-issues-java-settings-and-log-files/37637/2 "2013-06-05T08:48:09Z")

</div>

Hi Danny,

It is recommended to use the latest version of Sun Java JDK ([Java SE Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html)) and it is best to run a 64-bit operating system with the 64-bit Java VM.

However, if you are running a 32 bit system, then it is recommended to use a Heap Size of 1500MB, and not to exceed 1800MB.

You can find out more about these settings here:

[How to do performance tuning](https://www.wowza.com/docs/how-to-do-performance-tuning)

As for the logging question, there is no built in way to delete old log files that I know of. You can manually delete them or you can turn them off by commenting everything out in [wowza-install-dir]/conf/log4j.properties.

Salvadore
