spring booti链接doris容易报reach limit of connections #18235
howardyan93
started this conversation in
RFC
Replies: 2 comments
-
|
If you use hikari in springboot, you can adjust the following configuration in your application.yml spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:9030?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
username: root
password: xxxxx
hikari:
minimum-idle: 0
idle-timeout: 10000
max-lifetime: 1800000
connection-timeout: 30000BTW, If you go to the springboot community to ask questions, maybe you will get more beneficial information. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
qe_max_connection 每个 FE 的最大连接数 ,默认是1024,可以在fe配置文件中修改默认值 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
spring boot使用的是mysql的jar包+mybatis。
之前报过一次问题,然后按照文档指引修改max_user_connections为500后问题消失。
但是最近用doris的后端服务多了,又使用同一个帐号,这个报错就又开始出现了。
进入web ui一看session,的确有超过500个链接了,command状态均为sleep。
继续改大max_user_connections治标不治本,目前由于有多个fe,所以让不同的后端通过不同的fe链接,避开每个fe最大连接数的限制。
个人觉得这不是doris的问题,目前也就三个后端服务在使用doris查询,访问频率也不是很频繁。但是就是不知道连接总数为何超过了500。怀疑sprint boot没有连接池没有释放资源。是但是不熟悉spring boot,不知道该怎么修改才好。
有达人知道怎么弄么?
Beta Was this translation helpful? Give feedback.
All reactions