Skip to content

Commit edc759a

Browse files
committed
Address vale lint checks on word usage
1 parent 8c7e3af commit edc759a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

source/faq.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,30 @@ worker process. This process is described in more detail in the
118118

119119
Each libmongoc client maintains its own connections to the MongoDB deployment
120120
and a view of its topology. When a persistent libmongoc client is reused, the
121-
PHP driver is able to avoid the overhead of establishing new connections and
121+
PHP driver can avoid the overhead of establishing new connections and
122122
rediscovering the topology. This approach generally improves performance and is
123123
therefore the driver's default behavior.
124124

125-
Persistent libmongoc clients are not destroyed until the PHP worker process
125+
Persistent libmongoc clients are not freed until the PHP worker process
126126
terminates. This means that connections to a MongoDB deployment may remain open
127127
long after a ``MongoDB\Driver\Manager`` object goes out of scope. While this is
128128
typically not an issue for applications that connect to one MongoDB deployment,
129129
it could be problematic in some situations. Consider the following cases:
130130

131-
- PHP-FPM is configured with ``pm.max_requests=0`` (i.e. workers never respawn)
132-
and a PHP application is deployed many times with small changes to its MongoDB
133-
connection string and/or options. This could lead to an accumulation of
134-
libmongoc client objects within each worker process.
131+
- PHP-FPM is configured with ``pm.max_requests=0`` (workers never respawn) and a
132+
PHP application is deployed many times with small changes to its MongoDB
133+
connection string or options. This could lead to an accumulation of libmongoc
134+
client objects within each worker process.
135135
- An application occasionally connects to a separate MongoDB deployment in some
136136
backend component where request latency is not paramount.
137137

138138
In the first case, restarting PHP-FPM as part of the application deployment
139-
would allow the application to relinquish any unused libmongoc clients and still
140-
utilize a persistent client for the latest connection string.
139+
allows the application to relinquish any unused libmongoc clients and still use
140+
a persistent client for the latest connection string.
141141

142142
The second case warrants a different solution. Specifying ``true`` for the
143143
``disableClientPersistence`` driver option will instruct the PHP driver to
144-
create a new libmongoc client and ensure it is destroyed when the corresponding
144+
create a new libmongoc client and ensure it is freed when the corresponding
145145
``MongoDB\Driver\Manager`` goes out of scope.
146146

147147
.. code-block:: php
@@ -154,9 +154,9 @@ create a new libmongoc client and ensure it is destroyed when the corresponding
154154
driverOptions: ['disableClientPersistence' => true],
155155
);
156156

157-
The ``disableClientPersistence`` driver option should be used sparingly, as
158-
opting out of client persistence means that additional time will be required to
159-
establish connections to the MongoDB deployment and discover its topology.
157+
Use the ``disableClientPersistence`` driver option sparingly, as opting out of
158+
client persistence will require more time to establish connections to the
159+
MongoDB deployment and discover its topology.
160160

161161

162162
Server Selection Failures

0 commit comments

Comments
 (0)