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

RingBuffer growing beyond expected limits #88

Closed
danikov opened this issue Apr 26, 2023 · 5 comments
Closed

RingBuffer growing beyond expected limits #88

danikov opened this issue Apr 26, 2023 · 5 comments

Comments

@danikov
Copy link

danikov commented Apr 26, 2023

Driver version

2.1.0.9

Problem description

  1. Expected behaviour: RingBuffer should adhere to set limits; fetchRingBufferSize is unset and should default to 1G which https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-configuration-options.html#jdbc20-enablefetchringbuffer-option implies is a 1GB limit
  2. Actual behaviour: RingBuffer consumes entire heap and OOMs the JVM due to lack of bounds on large result sets, despite heap sizes well in excess of 1Gb.
  3. Error message/stack trace: N/A due to OOM, but heap dump indicates a single RedshiftRowsBlockingQueue instance consuming far in excess of 1Gb of memory
  4. Any other details that can be helpful: A dive into the code suggests that RedshiftRowsBlockingQueue's capacity parameter is based on the number of entries, e.g. rows, not a memory size. This suggests the documentation for this configuration is wrong and either should be changed to indicate number of rows, and/or needs additional functionality to detect and respond to overall memory usage.
@bhvkshah
Copy link
Contributor

Thanks for submitting this issue, @danikov . I will take a look and get back to you when I have an update.

@bhvkshah
Copy link
Contributor

@danikov could you please provide driver logs for this issue?

@danikov
Copy link
Author

danikov commented Jun 19, 2023

@bhvkshah sorry for not updating sooner, I understand the driver logs and other support has been provided by other channels?

@bhvkshah
Copy link
Contributor

bhvkshah commented Jul 6, 2023

@danikov yes, we have a fix we are testing currently. I'll keep you posted on when it will be available publicly.

@bhvkshah
Copy link
Contributor

bhvkshah commented Aug 1, 2023

Fix has been released in driver version 2.1.0.18. Thank you for your contribution to the Redshift JDBC driver!

@bhvkshah bhvkshah closed this as completed Aug 1, 2023
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