-
Notifications
You must be signed in to change notification settings - Fork 517
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
使用mysql作为图库数据存储时,每个图库都会占用连接数,且不释放的问题 #2668
Comments
要解决在使用MySQL作为HugeGraph存储时,批量创建知识图谱导致数据库连接数超出最大限制的问题,可以调整HugeGraph-Loader的配置参数,特别是与连接数和批量插入相关的参数。 根据文档内容,可以调整以下参数: {
"version": "2.0",
"structs": [
{
"id": "1",
"input": {
// 其他输入源配置
},
"vertices": [
// 顶点映射配置
],
"edges": [
// 边映射配置
]
}
],
"options": {
"max-conn": 4, // 调整为适合的连接数
"max-conn-per-route": 2, // 调整为适合的每个路由的连接数
"batch-size": 500, // 调整批量大小
"timeout": 60, // 插入结果返回的超时时间(秒)
"retry-times": 3, // 发生特定异常时的重试次数
"retry-interval": 10 // 重试之前的间隔时间(秒)
}
} 具体调整建议:
此外,确保在HugeGraph的MySQL存储实现中正确管理连接池。例如,在 @Override
public void close() {
LOG.debug("Store close: {}", this.store);
this.checkClusterConnected();
this.sessions.close();
} |
@dosu |
To address the issue of creating hundreds of graph instances on a single node and the resulting MySQL connection limitations, it's important to understand the user's usage scenarios and methods. Here are some key points: Usage Scenarios and Methods for Creating Graph Instances
Reasons for Not Using Subgraph Partitioning, Permission Management, or Tenants
These points should help clarify the user's usage scenarios and methods, and why they might not be using subgraph partitioning, permission management, or tenants for resource isolation [1]. |
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label |
Problem Type (问题类型)
struct / logic (架构 / 逻辑设计问题)
Before submit
Environment (环境信息)
Your Question (问题描述)
我们在使用mysql作为hugegraph的存储方式时,在批量创建知识图谱时出现了程序提示超出了数据库最大链接数的问题,经过验证发现,知识图谱在创建完成后,且没有访问的情况下,每个知识图谱对应的数据库都会占用最低两个数据库链接。【重启 hugegrapg-server】后,链接即被占用。
按照这个数据推送,如果数据库最大链接数为2000,只能创建约667个知识图谱,请问如何解决该问题,因为数据库链接资源有限
Vertex/Edge example (问题点 / 边数据举例)
No response
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
No response
The text was updated successfully, but these errors were encountered: