-1

I'm currently searching for any help about this.
I'm trying to start a Tomcat 7 server, but I only get PermGen Space exception.

I tried to change the XXMaxPermSize value, but when I change it, I get a Pop Up at launch of my Eclipse :

"Failed to Create the JVM"

I already had this error before (the Failed to Create the JVM), and it appeared suddenly. Never changed the configuration of my eclipse, but one day to the other, this happened and needed to change de memory allocation in my .ini file.

It's perfectly fine to run Tomcat 6, but I guess Tomcat 7 is way more consuming

Here is my Eclipse .ini :

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-vm
C:/Program Files (x86)/Java/jdk1.6.0_45/bin
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms384m
-Xmx1024m

The problem is coming from the launcher.XXMaxPermSize.
Impossible to increase the value, otherwise, Eclipse just won't launch.
It launches with 256M but crashes with 512...

This can't be a Hardware limitation though since my PC got 8G RAM.

Any idea? Am I missing something obvious?

Gaëtan
  • 103
  • 9

3 Answers3

1

On Windows, by default, 32-bit processes can only address up to 2 GiB of memory (even if you have much more RAM).

With 512 MiB perm, plus a 1 GiB heap along with the JVM / library overhead you're likely to be exceeding this.

If you run this from the command line:

java -version

You'll see an output like this:

java version "1.x.0_xx"
Java(TM) SE Runtime Environment (build 1.x.0_xx-bxx)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode, sharing)

A 64-bit JVM would look like this:

java version "1.x.0_xx"
Java(TM) SE Runtime Environment (build 1.x.0_xx-bxx)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

If it's on a 64-bit system, upgrade to a 64-bit JVM (although it is possible to configure Windows to allow bigger 32-bit processes on a 64-bit system, the 64-bit JVM is the preffered approach).

See this answer for further details:

https://stackoverflow.com/a/9533056/575766

You should also know that you can request arbitrary values for your perm space (300, 384, 412 etc.). With some experimentation, you may find you have enough space to start the process with the 2 GiB limit anyway.

Community
  • 1
  • 1
Michael
  • 7,348
  • 10
  • 49
  • 86
  • 1
    This might be the solution for me. I'll update Eclipse and Java to 64 bits and I'll take a look. Thanks for this. I'll reach back once everything will be installed – Gaëtan Jun 15 '15 at 09:17
  • Ok, make sure that your server points to the right / new version once you've got it installed (for example, your Eclipse setting explicitly point to the 32-bit version). – Michael Jun 15 '15 at 09:19
  • The problem is solved, I can increase the MaxPermSize without any trouble. Thanks for the solution! – Gaëtan Jun 15 '15 at 09:29
  • Seems I got lucky on my try. Things has changed since yesterday. Unable to launch my 32 bits Eclipse which was running fine before with the configuration mentioned on my first post. And PermGen space at launch on the Tomcat 7 server (even with 2GB MaxPermSize...). – Gaëtan Jun 16 '15 at 09:39
0

Beware of parameters declaration order in the eclipse.ini, I already noticed that some parameters are not supported everywhere, for example, you may want to try moving the -vm line at the bottom of the file (after the -vmargs)

Gab
  • 7,869
  • 4
  • 37
  • 68
  • Doing this makes an other error pop up : "Version 1.4.2_03 of the JVM is not suitable for this product. Version: 1.6 or greater is required". Tried to put it just before the Dogsi line, same result than at the very bottom of the file – Gaëtan Jun 15 '15 at 09:00
0

Problem solved :

Gaëtan
  • 103
  • 9