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

MonitorConnectionContext queue cause memory leak #585

Closed
ftasso opened this issue Jun 10, 2024 · 7 comments
Closed

MonitorConnectionContext queue cause memory leak #585

ftasso opened this issue Jun 10, 2024 · 7 comments
Labels
bug Something isn't working pending release Resolution implemented, pending official release

Comments

@ftasso
Copy link

ftasso commented Jun 10, 2024

Describe the bug

Hello,
using the driver v1.1.15 version, in Monitor class, Queue just have add in startMonitoring and run method, no remove in stopMonitoring method, this will cause memory leak.

Expected Behavior

remove unused MonitorConnectionContext in queue.

Current Behavior

AWS-Jdbc_memory_leak

Reproduction Steps

integrate aws driver and run application monitor the class instance

Possible Solution

No response

Additional Information/Context

No response

The AWS JDBC Driver for MySQL version used

v1.1.15

JDK version used

openjdk version "1.8.0_382"

Operating System and version

NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/"

@ftasso ftasso added the bug Something isn't working label Jun 10, 2024
@aaronchung-bitquill
Copy link
Contributor

Hi @ftasso

Thanks for reaching out and raising this issue. This is currently a known issue. For a workaround, can you try the experimental Host Monitoring Plugin v2? The Host Monitoring Plugin v2 is functionally equivalent to the Host Monitoring Plugin and they are configured using the same parameters. The Host Monitoring Plugin v2 was created to address the issues that you have been experiencing, and it is meant to be a more stable version of the Host Monitoring Plugin. As it is currently an experimental plugin, please note that it should be tested before being used in a production environment.

However, I highly recommend migrating from the AWS MySQL JDBC driver to the AWS Advanced JDBC Wrapper Driver. As per the maintenance policy (linked here), the AWS MySQL JDBC Driver maintenance windows ends very soon on July 25, 2024. The AWS Advanced JDBC Wrapper Driver has all of the same features and more, and is actively being supported and developed.

Thank you!

@ftasso
Copy link
Author

ftasso commented Jun 11, 2024

Hello,
many thanks for your reply.
Ok I got it, I will start che evaluation of the Plugin V2 asap and I will schedule the migration to the advanced JDBC Wrapper Driver.

Bye!
Fabrizio

@aaronchung-bitquill
Copy link
Contributor

Hi @ftasso

Wanted make sure you are aware that we have a bug with the Host Monitoring Plugin V2 that may result in java.util.ConcurrentModificationException.

However, the fix has recently been merged in and available on the latest snapshot build. If you don't mind trying out a snapshot version, could you kindly checkout our snapshot build and let us know if the issue still persists?

Thank you!

@davecramer
Copy link
Contributor

Closing due to lack of response

@ftasso
Copy link
Author

ftasso commented Jun 25, 2024

Hello,
sorry for my late reply.
I made a new build of my app using the jar file aws-mysql-jdbc-1.1.16-20240624.122534-5.jar with HostMonitoringPluginV2 and I finally forgot the memory leaks.

Thank you,
Fabrizio

@davecramer
Copy link
Contributor

@ftasso has this been resolved then ?

@davecramer davecramer reopened this Jun 25, 2024
@ftasso
Copy link
Author

ftasso commented Jun 25, 2024

Yes, it works well.

Thank you

@aaronchung-bitquill aaronchung-bitquill added the pending release Resolution implemented, pending official release label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending release Resolution implemented, pending official release
Projects
None yet
Development

No branches or pull requests

3 participants