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

[DOCS] make an explicit warning not to create clients for each request #324

Merged
merged 8 commits into from
Feb 26, 2025

Conversation

scottluu
Copy link
Contributor

@scottluu scottluu commented Jan 31, 2025

This is a super easy and common pitfall so it should be made extra obvious

make an explicit warning not to create clients for each request
@scottluu scottluu requested a review from ShaneHarvey February 3, 2025 22:27
when your application starts and reuse that one client for the lifetime
of the process. You can maintain the client by storing a database handle
from the client on your application object, as shown in this example.
.. WARNING::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind using lower case here (.. warning) to match our other uses? And same for the other file.

@scottluu scottluu requested a review from ShaneHarvey February 17, 2025 22:37
ShaneHarvey
ShaneHarvey previously approved these changes Feb 18, 2025
@ShaneHarvey ShaneHarvey merged commit e036c63 into mongodb:master Feb 26, 2025
44 checks passed
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.

3 participants