开发者

Running multiple jvms for different applications in same machine

开发者 https://www.devze.com 2022-12-23 02:17 出处:网络
We are getting frequent out of memory errors in our dev. machi开发者_如何转开发nes We are running webshpere, eclipse, soap UI and maven in it. Our server gets down due to this \"out of memory errors\"

We are getting frequent out of memory errors in our dev. machi开发者_如何转开发nes We are running webshpere, eclipse, soap UI and maven in it. Our server gets down due to this "out of memory errors" when we restart our applications in websphere 2/3 times, We already increased the virtual memory setting in wesphere to 1GB.

So what i did was copied the jre we use in eclipse and maven folders so that each of these uses individual jvms. But the performance of websphere is same. 2/3 restarts and out of memory errors.

Is there any may of making eclipse and maven use different jvms other than websphere's?


In response to the question:

If you start java multiple times, multiple copies of java will be running with each their own memory. Eclipse and websphere are probably started separately so use independent memory. Your trouble should not be there.

In response to your problem

Out of Memory

Both Eclipse and Websphere can gobble up memory like there's not tomorrow. Look al the -X flags, the flag for perm gen space should be added to the flag for heap space to get the memory consumption. Also allow some overhead for the OS, windowing environment, e-mail client, browser (500 MB - 1 GB or so, depending on the OS and what you're running). So it can be that the computer is out of memory.

More frequently the amount of memory assigned to the jvm is just not enough. Java has not been started with enough memory for the app assigned to it. It's up to you to deduce if it is Heap Space which ran out, or PermGen space. Both can be adjusted, have a look at this website. The flags are -Xmx and -XX:MaxPermSize. Look at the start scripts for Websphere, as that's the one complaining.

Recommendation

Check which kind of memory is out, and search for that on stack overflow; either PermGen or Heap Space should do.


You should set the JVM Xmx parameter less than or equal to 256MB in all the three process. It will never cross the 256 MB limit (considering that the program does not have memory leaks)


Copying the folder won't be enough.

In Eclipse, go to Preferences, under Java-> Installed JREs make sure the JRE used is on a different path than the one used by WebSphere.

0

精彩评论

暂无评论...
验证码 换一张
取 消