首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Thymeleaf应用程序在生产中死锁,卡在Thymeleaf代码中

Thymeleaf应用程序在生产中死锁,卡在Thymeleaf代码中
EN

Stack Overflow用户
提问于 2018-11-26 23:44:47
回答 1查看 91关注 0票数 0

是什么导致了这种情况的发生?我的web应用程序冻结并停止响应。我去做了一个线程转储,发现Thymeleaf中有几个线程都被阻塞了:

代码语言:javascript
复制
Thread 3247: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
 - java.util.concurrent.Semaphore.acquire() @bci=5, line=312 (Compiled frame)
 - org.thymeleaf.util.ResourcePool.allocate() @bci=4, line=108 (Compiled frame)
 - org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(org.thymeleaf.Configuration, java.lang.String, java.io.Reader, org.thymeleaf.util.ResourcePool) @bci=2, line=124 (Compiled frame)
 - org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(org.thymeleaf.Configuration, java.lang.String, java.io.Reader) @bci=8, line=116 (Compiled frame)
 - org.thymeleaf.TemplateRepository.getTemplate(org.thymeleaf.TemplateProcessingParameters) @bci=556, line=278 (Compiled frame)
 - org.thymeleaf.TemplateEngine.process(org.thymeleaf.TemplateProcessingParameters, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=11, line=1104 (Compiled frame)
 - org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IProcessingContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=110, line=1060 (Compiled frame)
 - org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=17, line=1011 (Compiled frame)
 - org.thymeleaf.spring4.view.ThymeleafView.renderFragment(org.thymeleaf.fragment.IFragmentSpec, java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=590, line=335 (Compiled frame)
 - org.thymeleaf.spring4.view.ThymeleafView.render(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=5, line=190 (Compiled frame)

是什么导致了这种情况?表示层代码并没有随着应用程序的最新版本而改变。该应用程序相当成熟和稳定。我不知道从哪里开始调查。应用程序被重新部署回以前的版本,而我试图通过负载测试重现该问题。

为什么Thymeleaf需要任何类型的锁定?Thymeleaf在这里似乎有一些基本的架构方面在起作用,我不明白。

按照最严格的定义,这在技术上可能不是“死锁”,但结果是相同的。

EN

回答 1

Stack Overflow用户

发布于 2018-11-27 11:48:42

答案是,耗尽堆空间可能会导致上述争用。

进一步的调查(我们不必看得太远)显示,由于共享相同JVM的相关应用程序中的某些过度活跃的缓存,JVM正在耗尽堆空间。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53484627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档