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

OOM error on Comdb2 JDBC driver #3755

Open
hgeraldino opened this issue Mar 27, 2023 · 2 comments
Open

OOM error on Comdb2 JDBC driver #3755

hgeraldino opened this issue Mar 27, 2023 · 2 comments

Comments

@hgeraldino
Copy link
Contributor

Describe the bug
Each Comdb2Connection has an internal Comdb2Handle that is reused across all statements for the given connection. Because of this, there's a potential for the internal List<String> set commands that is used to keep track of the set commands to grow unbounded and cause OOM errors. This is not a theoretical problem: we've encountered this issue when running the latest 2.6.0 version of the JDBC driver.

To Reproduce
Steps to reproduce the behavior:
Please refer to the https://github.com/hgeraldino/comdb2-oom-example repository, which has a sample Integration Test that can be used to reproduce the problem.

Expected behavior
Each java.sql.Statement should only care about the set SQL statements of its own.

Screenshots
The referenced project has a Screenshot of a heap dump taken from one of our running applications. It shows the enormous number of String references kept by the Comdb2Handle .

Environment (please complete the following information):

  • Operating System and Version:
$ uname -a
Linux <hostname> 3.10.0-1160.80.1.el7.x86_64 #1 SMP Sat Oct 8 18:13:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
@Brunosampaiomartins
Copy link

SQL Error: Internal jdbc driver error
Internal jdbc driver error
Internal jdbc driver error
Java heap space
Java heap space

Alguém sabe pq esse erro?

@hgeraldino
Copy link
Contributor Author

SQL Error: Internal jdbc driver error Internal jdbc driver error Internal jdbc driver error Java heap space Java heap space

Alguém sabe pq esse erro?

Might be related, but it's hard to tell without a heap dump. I'd suggest taking a heap dump and examining its contents in order to pinpoint the cause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants