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

线上环境升级到6.1.0,服务器CPU直接99%以上,下不来,接口全部无响应 #789

Open
Q3061932198 opened this issue Dec 23, 2023 · 3 comments

Comments

@Q3061932198
Copy link

Q3061932198 commented Dec 23, 2023

是因为SQL解析超时的问题吗?框架还使用了mybatis-plus最新版3.5.4.1

降到6.0.0,恢复正常,如果是解析超时,我看错误日志也看不出来有任何问题,怎么看解析超时啊

@Q3061932198 Q3061932198 changed the title 真实环境升级到6.1.0,服务器CPU直接99%以上,下不来,接口全部无响应 线上环境升级到6.1.0,服务器CPU直接99%以上,下不来,接口全部无响应 Dec 23, 2023
@abel533
Copy link
Collaborator

abel533 commented Dec 25, 2023

使用6.1.0的同时,使用加下面依赖试试(超时10秒):

<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>sqlparser-timeout</artifactId>
    <version>6.1.0</version>
</dependency>

可以jstack看看线程在做什么,如果很多线程都停留在jsqlparser,就有可能是解析超时。

@abel533
Copy link
Collaborator

abel533 commented Dec 25, 2023

如果超时的概率很高,就发个小版本默认加上超时。

@abel533 abel533 pinned this issue Dec 25, 2023
@Q3061932198
Copy link
Author

使用6.1.0的同时,使用加下面依赖试试(超时10秒):

<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>sqlparser-timeout</artifactId>
    <version>6.1.0</version>
</dependency>

可以jstack看看线程在做什么,如果很多线程都停留在jsqlparser,就有可能是解析超时。

这个sqlparser-timeout确定是默认10秒?我看代码怎么感觉是100秒啊?
image
毫秒转换成秒,去掉末尾的三个0就是秒的吧?去掉三个0剩下的是100秒

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