2

I've downloaded Version 1.0.0 of WSO2 Enterprise Mobility Manager
I followed the Prerequisites and
the General Server Configurations

System Win 7 64bit 12GB RAM
JDK java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
JAVA_HOME is set to JDK Directory

if I execute:

<PRODUCT_HOME>\bin>wso2server.bat --run

I get following error:

JAVA_HOME environment variable is set to C:\Program Files\Java\jdk1.7.0_51
CARBON_HOME environment variable is set to C:\inetpub\wwwroot\WSO2MO~1.0\bin\..
java.lang.OutOfMemoryError: Java heap space
Dumping heap to C:\inetpub\wwwroot\WSO2MO~1.0\bin\..\repository\logs\heap-dump.h
prof ...
Heap dump file created [1077051686 bytes in 5.148 secs]
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
    at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2367)
    at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.
java:130)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractString
Builder.java:114)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:535
)
    at java.lang.StringBuffer.append(StringBuffer.java:322)
    at java.io.BufferedReader.readLine(BufferedReader.java:363)
    at java.io.BufferedReader.readLine(BufferedReader.java:382)
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.processBundle
sInfoFile(DropinsBundleDeployer.java:146)
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.perform(Dropi
nsBundleDeployer.java:71)
    at org.wso2.carbon.server.Main.invokeExtensions(Main.java:149)
    at org.wso2.carbon.server.Main.main(Main.java:94)
    ... 6 more

I tried to raise heap size in wso2server.bat on line 161 up to -Xms4000m XmX8000mbut then I get an error java.lang.OutOfMemoryError: Requested array size exceeds VM limit

What can I do to get the Enterprise Mobility Server succesfully running?

hifi-dd
  • 21
  • 1
  • 3
  • Is [this](http://stackoverflow.com/questions/5497259/how-to-fix-requested-array-size-exceeds-vm-limit-error-in-java) any help? – James M Apr 15 '14 at 16:35
  • sorry no positive results with these options - `-Xmx6G -XX:MaxPermSize=128M -XX:+UseCompressedOops` the exact result is `Requested array size exceeds VM limit` – hifi-dd Apr 16 '14 at 07:29
  • Can you post your heap dump in WSO mailing list? We might be able to help you? – Dilshan May 13 '14 at 07:17

2 Answers2

1

I tried to raise heap size in wso2server.bat on line 161 up to -Xms4000 XmX8000

You omitted the units - which defaults to kilobytes. Try:

-Xms4g -Xmx8g

You might also try running with -verbose:gc and visualize the data with a tool like HPjmeter. This will help you with sizing the heap appropriately.

Amir Afghani
  • 37,814
  • 16
  • 84
  • 124
  • Hi Amir, i tried to take a look with HPjmeter at heap file `heap-dump.hprof` and click on Estimate->Memory Leaks `Memory Leaks: Memory Leaks: bytes held 1074003964 char[]@700000858` shows up I'm new to the tool so if you want any other metrics please let me know. – hifi-dd Apr 16 '14 at 07:38
  • that just means there is about 1 gig of Strings that you're keeping in memory. If this answer or the others provided helped you, you should consider voting on them or accepting them. – Amir Afghani Apr 16 '14 at 19:19
  • till now no answer helps me to get the EMM-Server to run - and till now I can't vote on an answer ... missing reputation :-( – hifi-dd Apr 17 '14 at 09:09
  • Amir can you post your heap dump in WSO mailing list? We might be able to help you. – Dilshan May 12 '14 at 06:57
  • @Dilshan, I'm not the person who ran into the issue - I'm someone who attempted to help the OP. – Amir Afghani May 12 '14 at 18:52
  • Ooops sorry messed up the comments. – Dilshan May 13 '14 at 07:16
0

Your -Xms and -Xmx options are way too low. This may be helpful. The number after those options is not in KB or MB, it's in just B... Your JVM won't even run at 8000B. Try increasing it to a reasonable number.

Edit: The prerequisites you linked states you need:

~ 512 MB heap size. This is generally sufficient to process typical SOAP messages but the requirements vary with larger message sizes and the number of messages processed concurrently.

Community
  • 1
  • 1
user3507600
  • 1,075
  • 9
  • 15