Spring Integration PermGen空间

时间:2013-12-06 12:42:20

标签: java spring spring-integration permgen

我尝试使用spring-integration工作来获得我的spring应用程序。

但不幸的是。一旦我将Spring-integration添加到我的应用程序中,一旦启动它,我就会得到PermGen Space错误。

我在tomcat 7上使用Spring版本3.2.3和Spring集成Verison 2.2.3。 我已经将permsize更改为512m,这并没有解决问题。 XX:MaxPermSize参数=512米

在我的spring环境中,我只尝试创建一个客户端连接:

<beans>
        <int:gateway id="gw"
            service-interface="com.example.tcpclientserver.SimpleGateway"
            default-request-channel="input"/>

    <int-ip:tcp-connection-factory id="client"
            type="client"
            host="10.10.1.2"
            port="2001"
            single-use="true"
            so-timeout="10000"/>

    <int:channel id="input" />

    <int-ip:tcp-outbound-gateway id="outGateway"
            request-channel="input"
            reply-channel="clientBytes2StringChannel"
            connection-factory="client"
            request-timeout="10000"
            reply-timeout="10000"/>

    <int:transformer id="clientBytes2String"
            input-channel="clientBytes2StringChannel"
            expression="new String(payload)"/>
</beans>  

知道可能出现什么问题吗?

1 个答案:

答案 0 :(得分:4)

PermGen Space是jvm内存的一部分,其中加载了

有几个原因可以解决PermGen Space错误。最常见的是:

  1. 您的应用程序实际上要加载很多类(对于在Oracle JVM上运行的典型应用程序,这种情况非常罕见)。您可以通过增加PermGen Space来解决这个问题(请参阅如何配置jvm)。
  2. 您的应用中存在类加载器泄漏。在这种情况下,您应该找到并消除它们。阅读thisthis文章系列,了解有关如何解决此问题的一些提示。