Pivotal Knowledge Base


Spring XD Deploying Streams to Container Fails due to Insufficient Memory Error


 Product  Version
 Spring XD  1.3.x


Spring XD streams fail to be deployed to the containers.


Possible errors that can be seen are:

2016-06-19T09:17:11-0000 1.3.0.RELEASE INFO DeploymentSupervisor-0 zk.ZKStreamDeploymentHandler - Deployment status for stream 'stream1': DeploymentStatus{state=failed,error(s)=Deployment of module 'ModuleDeploymentKey{stream='stream1', type=sink, label='pbSink'}' to container '469d9c49-7422-4c46-8441-d234ea4448bc' timed out after 300000 ms}


Exception in thread "thread-name" java.lang.OutOfMemoryError: PermGen space

This means that the Spring XD admin container JVM has run out of PermGen space. When PermGen becomes full, the JVM can no longer function properly and must be restarted.


Memory allocated to PermGen is separate from the heap and not affected by Java options like -Xmx or -Xms. PermGen can run out of space even if there is plenty of space in the heap. The HotSpot JVM provides options -XX:PermSize and -XX:MaxPermSize to set the initial size and the maximum allowed size of the PermGen, respectively.

For example, you could add this to your existing JAVA_OPTS:

-XX:PermSize=512M -XX:MaxPermSize=512M

You need to set this large enough that the error does not reoccur. 

For the other memory error, it may help to increase the minimum/maximum memory (-Xmx or -Xms) for the admin(s) containers. 

For other troubleshooting tips for Spring XD, please refer to Spring XD Troubleshooting. 



Powered by Zendesk