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

Prepared statements cache can lead to memory exhaustion #38

Open
StephG38 opened this issue Oct 5, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@StephG38
Copy link
Contributor

commented Oct 5, 2015

When using a long running connection using a lot of different prepared statements (eventually, these prepared statements being big statements), these prepared statements get cached.

This can lead to OOM errors, as this cache is unbounded.

This can be solved by 2 or 3 different ways :

  1. provide an option to disable the cache completely. This will avoid such OOM conditions.
  2. cache only statements within some size threshold
  3. use a better cache implementation (LRU for example)

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Oct 5, 2015

Fixes issue krummas#38
Adding an option to disable prepared statement cache.
This is a first step into resolving this issue.
@krummas

This comment has been minimized.

Copy link
Owner

commented Oct 6, 2015

could you convert the tabs to spaces?

other than that, lgtm

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Oct 6, 2015

Fixes issue krummas#38
Replacing tabs by spaces
(probably added by eclipse)
@StephG38

This comment has been minimized.

Copy link
Contributor Author

commented Oct 6, 2015

Hi Marcus,

Sorry about these tabs.
I am using eclipse and did not see it inserted tabs instead of spaces.
I just pushed 2 files that had these tabs.
Not sure if I need to post a new pull request though

Cheers

Stephane


Stephane Giron
Sr MTS
sgiron@vmware.com mailto:llauner@vmware.com
29, Boulevard des Alpes, 38240 Meylan, France
+33 6 89 51 43 69

[VMware]http://www.vmware.com/

http://www.vmware.com/

On 06 Oct 2015, at 08:38, Marcus Eriksson <notifications@github.commailto:notifications@github.com> wrote:

could you convert the tabs to spaces?

other than that, lgtm


Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_krummas_DrizzleJDBC_issues_38-23issuecomment-2D145754437&d=BQMCaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=JapcDH4703y1U1Jzbo_CQ4YjRlom6tww0q96ZCaKxVA&m=T54B3WVCkcjQNKspt1Y8yn-qAwjw-TshStzwhdfbTQ8&s=1m5R11yEmpY69VPbPOyfqDs8UnUDxJJFEgPwEbraVqA&e=.

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Oct 7, 2015

Fixes issue krummas#38
Replacing tabs by spaces
(probably added by eclipse)

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Oct 9, 2015

Fixes issue krummas#38
Renamed option noCache into noPrepStmtCache to be more explicit about
the cache that is disabled

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Oct 9, 2015

Relates to issue krummas#38
Updating README

StephG38 added a commit to StephG38/DrizzleJDBC that referenced this issue Nov 9, 2015

Relates to issue krummas#38
Removing useless double instanciation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.