-
Notifications
You must be signed in to change notification settings - Fork 180
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
Query hanging using the async api and different buffer size #588
Comments
Thank you @mfmmq, that should be a great help! I can reproduce the issue with your docker composition. A smaller number at Do you know if it blocks also without TLS? |
Thanks for getting back to me ! No, it doesn't block with SSL. Have pushed an disabled SSL version to branch
Our vendor has pushed the following change to a fork which stops the query from hanging -- thought I would mention in case it's helpful
|
I can reproduce this issue easily and I came to the same conclusion:
Calling For me it looks like a bug or design failure in libpq. I'll get in touch with the Postgres people. |
I wrote a simple patch for libpq that fixes this issue and proposed it to the Postgres hackers. They confirmed that this is a bug in libpq (and not in ruby-pg), but the patch is probably incomplete and needs more investigation and discussion. So I added the patch to the next Postgres commitfest as a placeholder: |
I think I have found a bug related to #325. I am using the
pg
gem in a rails app running against YugabyteDb, a distributed database. Specific queries are hanging when executing against Yugabyte, which has a different buffer size than that of vanilla postgres.If either the async api is disabled or the query is slightly updated (e.g. select is changed or limit is changed), it returns. This issue also seems to only occur with specific response sizes (81830 bytes < send bytes < 81920 bytes) over SSL/TLS.
I've pushed a repro here, let me know if it works on your end
git clone [email protected]:mfmmq/ruby-pg-async.git && cd ruby-pg-async && make
The text was updated successfully, but these errors were encountered: