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

[collector]bugfix: close connection when common cache is timeout #2786

Merged
merged 6 commits into from
Oct 29, 2024

Conversation

shinestare
Copy link
Contributor

What's changed?

we use hertzbeat to monitor oracle database, and found that the number of connections has been increasing. After restarting the hertzbeat, the number of connections decreased, just like the issues #2767. Through analyzing the logs, we found that the connection was not closed when getting the connection from the common cache. After modifying the code, it was found that it had returned to normal

Checklist

  • [√] I have read the Contributing Guide
  • [√] I have written the necessary doc or comment.
  • [√] I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

@shinestare
Copy link
Contributor Author

The log file contains the content of [connection common cache] is timeout, remove it, key CacheIdentifier {ip='jdbc:oracle:thin:@172.29.30.1:1521/apts', port='null', username+password=>hash='-789198372', customArg='null'}, but there is no content of connection common cache discard key which defined in the cacheMap listener or clean the timeout cache defined in cleanTimeoutOrUnHealthCache function. I don't know the reason, but the code works. This is the log file that may be helpful.
Uploading e6d7e84ddab411-2024-10-21.0.log…

@Ceilzcx Ceilzcx changed the title [collector]bugfix: colse connection when common cache is timeout [collector]bugfix: close connection when common cache is timeout Oct 28, 2024
@Ceilzcx Ceilzcx self-requested a review October 28, 2024 05:57
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tomsun28 tomsun28 added this to the 1.6.2 milestone Oct 29, 2024
@tomsun28 tomsun28 merged commit afe68ba into apache:master Oct 29, 2024
3 checks passed
@shinestare shinestare deleted the close-connection-branch branch October 29, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants