-
Notifications
You must be signed in to change notification settings - Fork 119
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
r2dbc core: Blocked main thread on createSslCustomizer #871
Comments
Hi @magiccrafter -- thanks for taking the time to look at this issue. @shubha-rajan has started looking into it, but we have a team event we're currently participating in so we probably won't have any update until next week. In the meantime, it would be great if you can provide more details steps on reproducing this issue - a small sample app and instructions on how to identify the block is happening might be great. |
@kurtisvg , I've created this tiny project which you can use to reproduce the issue: A baseline test run against local Postgres container proving that the issue is not in the SB and r2dbc libraries:
run locally against the dockerized postgres:
Steps to reproduce the issue:
Steps to check the good behavior with the previous version of SB 2.6.6 and io.r2dbc:r2dbc-postgresql:
The main difference is in the reactive r2dbc-postgresql library. |
Thanks for the work here, and sorry we haven't gotten a chance to look at this issue sooner -- we're stretch a little thin between holidays and summer vacations. This is a priority for us to try and address before the next release. |
@magiccrafter I'm having some trouble replicating this -- in our own sample, it seems like my profiler is saying it's happening in a background thread. Can I ask what profiler you are using? Can you provide step by step instructions on how you are getting your results? I'm unable to run your example -- no matter what I configure it just says "password must not be null" |
I've been playing around with this for couple of hours and managed to modify the app enough to get it to connect (I think?). But something is still going wrong -- if I call 'genN/100` I'm getting the following error:
I don't really understand what this means -- our sample app seems to be working fine, so I don't think it's my configuration or set up. I am getting connections in my database, so it seems to be connecting okay. but I don't understand enough SpringBoot to know what's happening under the hood. I'm going to bump this down to a p2 so it doesn't block the release -- not sure what's happening, but since we are unable to reproduce it I want to make it's a library problem and not an app problem. |
I've switched to cloud sql auth proxy for gcp (as a sidecar) to use the latest Spring Boot version. Since then we don't observe any performance issues. imo the root cause is with the version mismatch of the |
@magiccrafter ah interesting - so you suspect it's a problem between |
It looks like the problem was that the r2dbc driver moved group ids - I opened an issue on their repo (pgjdbc/r2dbc-postgresql#530) and manually bump our version: #909 |
@magiccrafter It seems like the version we released yesterday should have the newer r2dbc library. Can you check and see if you still have an issue or not? |
Just wanted to follow up here. Did the new release solve the problem? |
I will check it after my holiday. In two/three weeks time. |
Thanks for the update! I'll close this out if I don't hear back in ~30 days or so |
Bug Description
The current version of the library seems to block the main thread with the latest Netty & R2DBC driver/SPI.
Profiling results:
CPU Utilization:
Between the 12th and 14th minutes, I've run a very light load test of 2 rps to troubleshoot the problem faster.
CPU Thread HotSpots:
Versions of the libraries used to reproduce the problem:
Spring Boot: 2.7.0
Nety Core: 4.1.77.Final
Reactor netty: 1.0.19
io.r2dbc:r2dbc spi: 0.9.1.RELEASE
io.r2dbc:r2dbc pool: 0.9.0.RELEASE
org.postgresql:r2dbc-postgresql:jar:0.9.1.RELEASE
for more details check the dependency tree:
Stacktrace
N/A
How to reproduce
com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres
dependency to connect to a managed Postgres db in GCPEnvironment
The text was updated successfully, but these errors were encountered: