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

Inline expression with groovy may cause memory leak #919

Closed
Pramy opened this issue Jun 8, 2018 · 1 comment
Closed

Inline expression with groovy may cause memory leak #919

Pramy opened this issue Jun 8, 2018 · 1 comment
Assignees

Comments

@Pramy
Copy link
Contributor

Pramy commented Jun 8, 2018

版本号为 3.0.0.M1

环境是jdk1.8,spring boot 1.5.9,只使用的分库分表

问题

线上跑了一段时间后,发现class对象原来远多,晚上看了一下只有20w个class,但是到了早上就到了40w个,并且老年代持续升高并且gc回收的空间很少,最后直接oom了,通过dump分析,发现groovy加载了大量的classInfo,并且我的项目里只有SS依赖了groovy

复现代码

    //-Xmx200m -Xms200m
    public static void main(String[] args) {
        for (int i = 0; i < 100000; i++) {
            new InlineExpressionParser("\"${0..9}-${0..9}\"").evaluate();
        }
    }
@terrymanu
Copy link
Member

fixed at 3.0.0.M2

This was referenced Jul 5, 2018
@terrymanu terrymanu changed the title Groovy 解析 inline表达式导致OOM的问题 Inline expression with groovy may cause memory leak Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants