0

OK, somehow in the log of the server I was not getting the proper error, but after trying different things I got an OutOfMemory:PermGenSpace error, and for that one stackoverflow already has a solution.

Dealing with "java.lang.OutOfMemoryError: PermGen space" error

I use the solution there and my problem is solved :)

Thanks @maximdim for your help

I've been struggling with an issue for two weeks.

I am connecting to test.salesforce.com through a web service in a Java web application using jdk7.

I generated the stubs with JAX-WS wsimport.

I am using STS with VMWare vFabric tc Server v2.6 in my local environment, here connection works fine.

The problem is when I deploy to the test server which is SpringSource tc Runtime 7.0 with jdk 7 I get the following exception after doing the web service call:

Exception in thread "RMI TCP Connection(idle)"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"
Exception in thread "RMI TCP Connection(idle)"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"
Exception in thread "RMI TCP Connection(idle)" Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"

I have already incremented the memory parameters in the test server. It is starting with 1 GB or memory. I am giving more detail on the way memory has been increased:

vFabric server has a console, so we have the following configuration there:

Min Heap Size: 1,000MB 
Max Heap Size: 16,000 MB 
Thread Stack Sie: 192 KB.

I also found the file where these parameters are set (setenv.sh) and they are like this:

JVM_OPTS="-Xms1000m -Xmx16000m -Xss192k -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

I also know that is not a connectivity issue because sometimes the connection is made successfully but after that I get the error.

I also got a dump of the memory after the OutOfMemoryError and analyze it with Eclipse plug in and the memory leak is in:

com.sun.xml.internal.ws.client.sei.SEIStub
   $Proxy51

Tried to post the image here but as I am a new user stackoverflow didn't allow me.

Please HELP!! Any help will be appreciated.

Alan Robles

Community
  • 1
  • 1
Alan Robles
  • 31
  • 2
  • 8

2 Answers2

1

How exactly did you 'incremented the memory parameters'? There are few different memory regions in JVM so you might increment one of them but the problem is in another - e.g. PermGen vs. Heap.

maximdim
  • 8,041
  • 3
  • 33
  • 48
  • vFabric has a console, so we have the following configuration: Min Heap Size: 1,000MB Max Heap Size: 16,000 MB and Thread Stack Sie: 192 KB. I also found the file where these parameters are set (setenv.sh) and they are like this: JVM_OPTS="-Xms1000m -Xmx16000m -Xss192k -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" – Alan Robles Feb 27 '12 at 21:21
  • Try to add -XX:MaxPermSize=512m – maximdim Feb 28 '12 at 13:35
  • Thanks @maximdim actually I was not getting the logs properly so I haven't realized that it was an OutOfMemory:PermGen I used what you suggest and works. I updated the question saying I found the solution. Thanks again. – Alan Robles Feb 28 '12 at 22:28
  • I can't vote in any solutions.. I need 15 reputation and I am new user I only have one. Sorry :( – Alan Robles Feb 29 '12 at 17:18
  • 1
    It's not voting but accepting the answer. Click on big checkmark icon on the left of the answer you liked. – maximdim Feb 29 '12 at 20:26
1

OK, somehow in the log of the server I was not getting the proper error, but after trying different things I got an OutOfMemory:PermGenSpace error, and for that one stackoverflow already has a solution.

Dealing with "java.lang.OutOfMemoryError: PermGen space" error

I use the solution there and my problem is solved :)

Thanks @maximdim for your help.

Community
  • 1
  • 1
Alan Robles
  • 31
  • 2
  • 8