【问题标题】:Embedded Tomcat Would Not Start嵌入式 Tomcat 无法启动
【发布时间】:2015-03-02 07:38:19
【问题描述】:

我在 Jrebel 上运行 Jhipster 项目时遇到此错误。我尝试通过将此行插入到参数选项卡上的 VM 参数来将我的 java 堆大小增加到 512m,但无法解决错误。想问一下报错是什么原因,如何解决?

${jrebel_args}

-Xms512m -Xmx1024m

[ERROR] org.springframework.boot.context.embedded.tomcat.ServletContextInitializerLifecycleListener - Error starting Tomcat context: org.springframework.beans.factory.BeanCreationException
Exception in thread "main" 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
Exception in thread "process reaper" Exception in thread "process reaper" 

【问题讨论】:

    标签: spring spring-boot jhipster jrebel


    【解决方案1】:

    我通过在 VM Arguments (eclipse) 中添加 -XX:MaxPermSize=512m 解决了这个问题

    感谢 ZT(零周转)支持

    【讨论】:

      【解决方案2】:

      使用 JRebel 运行 JVM 将使用多达 50% 的内存,如果它使用更多则存在问题。以防万一,请尝试使用 -Xmx2048m 将最大限制加倍。这必须避免 OutOfMemoryError 。之后,您可以在观察实际内存使用情况时减少它。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-15
        • 2019-02-04
        • 2016-08-19
        • 1970-01-01
        • 2020-07-24
        • 2019-01-08
        • 2017-09-20
        • 2020-12-18
        相关资源
        最近更新 更多