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

fix: timed out fetching a new connection from the connection pool. #4998

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

youxq
Copy link

@youxq youxq commented Sep 12, 2024

fix (prisma/prisma#25162)

solution

Change new MakeTlsConnector, which is executed by each PostgreSql::new, to obtain it from MakeTlsConnectorManager.get_connector. The logic of get_connector is to create new MakeTlsConnector in the first call and save the created tls connector. All subsequent calls will clone the tls connector from the first call, thereby reducing the overhead of the new MakeTlsConnector.

test results

Use https://github.com/youxq/prisma-connection-test tool to test.

The bug of Timed out fetching a new connection from the connection pool. was successfully triggered before the fix.
image
It no longer appears after the fix.
image

@youxq youxq requested a review from a team as a code owner September 12, 2024 09:08
@youxq youxq requested review from Weakky and removed request for a team September 12, 2024 09:08
@CLAassistant
Copy link

CLAassistant commented Sep 12, 2024

CLA assistant check
All committers have signed the CLA.

@rwest202
Copy link

Is this ready to merge?

@aqrln aqrln self-assigned this Sep 26, 2024
@aqrln aqrln added this to the 5.21.0 milestone Sep 26, 2024
@aqrln
Copy link
Member

aqrln commented Sep 26, 2024

Thanks so much for the PR and sorry for the delay, I'll get to it soon (tomorrow or early next week).

@aqrln aqrln requested review from aqrln and removed request for Weakky September 26, 2024 10:36
Copy link

codspeed-hq bot commented Sep 26, 2024

CodSpeed Performance Report

Merging #4998 will not alter performance

Comparing youxq:fix/tls-builder (da82b63) with main (031f4d3)

Summary

✅ 11 untouched benchmarks

@youxq
Copy link
Author

youxq commented Sep 29, 2024

I have fixed the lint issue. Please help trigger the checks workflow again. Thanks.

@michael-rzero
Copy link

Would love to see this merged

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

Successfully merging this pull request may close these issues.

6 participants