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

[Bug] gremlin语句执行超时 将导致内存泄漏statement未释放 #1639

Closed
1 task done
z7658329 opened this issue Nov 9, 2021 · 3 comments · Fixed by #1643
Closed
1 task done

[Bug] gremlin语句执行超时 将导致内存泄漏statement未释放 #1639

z7658329 opened this issue Nov 9, 2021 · 3 comments · Fixed by #1643
Labels
bug Something isn't working

Comments

@z7658329
Copy link
Member

z7658329 commented Nov 9, 2021

Bug Type (问题类型)

No response

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题

Environment (环境信息)

Server Version: v0.11.x
Backend: mysql nodes, HDD or SSD
OS: 8 CPUs, 32 G RAM, Centos 7.x
Data Size: 50W vertices, 130W edges

Expected & Actual behavior (期望与实际表现)

1.当一个gremlin语句执行超时后,监控程序记录到该查询并未释放statement
2.gremlin语句为count语句,监控程序记录到该查询并未释放statement
1636463077(1)

监控monitor代码:
image

image

Expected & Actual behavior (期望与实际表现)

gremlin语法无论执行成功与否都会释放连接

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@z7658329 z7658329 added the bug Something isn't working label Nov 9, 2021
@z7658329
Copy link
Member Author

z7658329 commented Nov 9, 2021

org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler [] - Invalid request - responding with 500 Internal Server Error and Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [g.V("liujizheng6")]
java.util.concurrent.TimeoutException: Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [g.V("liujizheng6")]
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$1(GremlinExecutor.java:315) ~[gremlin-groovy-3.4.3.jar:3.4.3]
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.13.Final.jar:4.1.13.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]

@z7658329 z7658329 changed the title [Bug] gremlin语句执行超时&count语句 将导致内存泄漏statement未释放 [Bug] gremlin语句执行超时 将导致内存泄漏statement未释放 Nov 10, 2021
@javeme
Copy link
Contributor

javeme commented Nov 10, 2021

@z7658329 Thanks for your analysis, it seems to have addressed the root cause.

ps: we can wrap log with code block (a pair of "```")

org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler [] - Invalid request - responding with 500 Internal Server Error and Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [g.V("liujizheng6")]
java.util.concurrent.TimeoutException: Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [g.V("liujizheng6")]

z7658329 added a commit to z7658329/hugegraph that referenced this issue Nov 10, 2021
Fix bug: gremlin语句执行超时 将导致内存泄漏statement未释放

fix apache#1639
z7658329 added a commit to z7658329/hugegraph that referenced this issue Nov 10, 2021
Fix bug: gremlin语句执行超时 将导致内存泄漏statement未释放

fix apache#1639
z7658329 added a commit to z7658329/hugegraph that referenced this issue Nov 10, 2021
Fix bug: gremlin语句执行超时 将导致内存泄漏statement未释放

fix apache#1639
z7658329 added a commit to z7658329/hugegraph that referenced this issue Nov 10, 2021
Fix bug: gremlin语句执行超时 将导致内存泄漏statement未释放

fix apache#1639
z7658329 added a commit to z7658329/hugegraph that referenced this issue Nov 11, 2021
Fix bug: gremlin语句执行超时 将导致内存泄漏statement未释放

fix apache#1639
@javeme
Copy link
Contributor

javeme commented Jan 4, 2022

related issue: #1626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants