Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署之后遇到了语法过期的问题 #357

Closed
ICEMANbook opened this issue Aug 29, 2023 · 2 comments
Closed

部署之后遇到了语法过期的问题 #357

ICEMANbook opened this issue Aug 29, 2023 · 2 comments

Comments

@ICEMANbook
Copy link

我的是一个2G的服务器,按理来说内存是够的,但是部署完之后内存占用就会从74%慢慢升到95%,大概十多个小时候后内存就会被占满,服务器死机,只能重启。
由于是小白,不知道啥原因,琢磨半天没搞明白,后来halo作者让我查一下日志。
接着就发现问题所在了:

2023-08-27T21:37:37.539+08:00  WARN 8 --- [undedElastic-54] actStandardFragmentInsertionTagProcessor : [THYMELEAF][boundedElastic-54][module/macro] Deprecated unwrapped fragment expression "module/plugins :: plugins" found in template module/macro, line 31, col 13. Please use the complete syntax of fragment expressions instead ("~{module/plugins :: plugins}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.
2023-08-27T21:37:37.542+08:00  WARN 8 --- [undedElastic-54] actStandardFragmentInsertionTagProcessor : [THYMELEAF][boundedElastic-54][module/macro] Deprecated unwrapped fragment expression "module/script :: script" found in template module/macro, line 34, col 13. Please use the complete syntax of fragment expressions instead ("~{module/script :: script}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.
2023-08-27T21:37:37.542+08:00  WARN 8 --- [undedElastic-54] actStandardFragmentInsertionTagProcessor : [THYMELEAF][boundedElastic-54][module/script] Deprecated unwrapped fragment expression "module/pjax :: pjax" found in template module/script, line 76, col 13. Please use the complete syntax of fragment expressions instead ("~{module/pjax :: pjax}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.

类似的WARN有一大片,服务器每隔三五分钟报一次错,所以内存占用会缓慢上升,直到占满死机。
之后我换了一个主题观察了半天,果然没报过相同的WARN。
最后根据日志里的提示,把所有过期的代码都改成新的了,
重启后运行了半个小时,日志没再报错,内存占用也比较平稳。

所以最后我想问这个过期语法是什么原因造成的,是部署的时候安装了什么新版本的软件导致他不认老语法了吗

@ruibaby
Copy link
Collaborator

ruibaby commented Aug 29, 2023

过时语法一般不会造成这种问题,不过语法确实需要替换一下,我看到论坛上你已经修改了:https://bbs.halo.run/d/4249-%E4%B8%BA%E4%BB%80%E4%B9%88%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%86%85%E5%AD%98%E5%8D%A0%E7%94%A8%E4%BC%9A%E6%85%A2%E6%85%A2%E4%B8%8A%E5%8D%87%E6%9C%80%E5%90%8E%E6%AD%BB%E6%9C%BA/5

能否尝试给这个仓库提交一个 PR?

@ruibaby
Copy link
Collaborator

ruibaby commented Nov 20, 2023

已经在 83eff9c 中修复。

/close

@ruibaby ruibaby closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants