apache / apache/shardingsphere

How to handle Sleep Connection in ShardingSphere-Proxy

Open
#24,122 12 comments 0 reactions 1 assignee View on GitHub

@sunkai-cai is already working on this.

Since Mar 20, 2023.

db: MySQL good pro issue in: proxy status: volunteer wanted type: enhancement
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
9h 55m
Merged PRs (30d)
311

Description

Question

For English only, other languages will not accept.

Before asking a question, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.


Hello. I am currently using ShardingSphere-Proxy as a Djnago App connected to two Mysql DBs. However, after connecting ShardingSphere-Proxy in Django, it was not closed properly, so I found that the number of connections in Sleep state in ShardingSphere-Proxy gradually increased. To solve this, I wrote a code that explicitly closes the connection in Django, but I wondered if ShardingSphere-Proxy would add a function that closes the connection after a certain amount of time, such as Mysql's wait_time. ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout

Or, I wonder if it is possible to handle Sleep Connection in ShardingSphere-Proxy.

Please let me know in the comments if there's any information I've misunderstood.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.