Hi, I keep encountering a Java heap space error when I'm testing my mashup service. I tried restarting my server to clean the heap and start with a fresh new one without sucess. The problem seems to be with that function that I call around 200 time :
function addDescription (product) {
var productURL = product.url.toString();
var config =
<config>
<var-def name = "productURL">
{productURL}
</var-def>
<var-def name = "productDescription">
<xslt>
<xml>
<html-to-xml>
<http url="${productURL}" />
</html-to-xml>
</xml>
<stylesheet>
<file path="productInfo.xsl" />
</stylesheet>
</xslt>
</var-def>
</config>
var productScraper = new Scraper(config);
var itemDescription = new XML(productScraper.productDescription.substring(productScraper.productDescription.indexOf("?>") + 2));
product.appendChild(itemDescription.description);
product.appendChild(itemDescription.id);
return void(0);
}
I tried increasing the heap size to 512 MB but the Java process (the server is running on windows) is still consuming only around 160 MB. I modified my .vmoptions like this :
-Xms512m
-Xmx512m
-XX:PermSize=128m
-XX:MaxPermSize=128m
I don't know what to do from there, I keep getting the same Java heap space error.
Thanks in advance.
There was an issue in the
There was an issue in the 1.5.1 startup bat files for windows. They don't load the vm options properly. It was fixed in trunk.
You can get the latest .bat files from https://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/distribution/bin/ and replace ones in your installation.
If you like, you can also get the latest nightly build from http://builder.wso2.org/browse/MASHUP-NIGHTLY/latest/artifact
Tyrell
Not working
I changed the .bat file and it didn't seems to affect the memory usage of the Java process. I might not be looking at the right place though but in the process manager it says that the java.exe process uses about 162 000 KB. I tried my service anyways and still ended up with a java heap space fault.
My .vmoptions contain the following
-Xms512m
-Xmx512m
-XX:PermSize=64m
-XX:MaxPermSize=64m
Any idea about what should I do? Try to run it in a linux environnement maybe?
Thank you in advance
edit : The nightly build crash when I try to start it, it seems to have something to do with the wrapper.
solution 1 ---------- You
solution 1
----------
You need to change at least 2 bat files.
- wso2mashup.bat
- startup.bat
Then instead of starting the windows service, try starting the server using the startup.bat
If you need the windows service here's a potential solution.
Solution 2
----------
in your mashup server installations /conf folder, there's a file named 'wrapper.conf'. Uncomment lines 58 and 61 and give the memory values you require there.
The wrapper will initialize the VM using these values when the service is restarted.
Tyrell
It's working! Thanks a lot
Solution 2 worked for me.
Thank you for you continuous support!