Skip to content

Commit 3afb9aa

Browse files
committed
Fix DB performance tuning suggestion
1 parent 5869dda commit 3afb9aa

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

docs/guide/en/performance-tuning.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,7 @@ Keep envelope depth reasonable (typically 2-3 layers).
276276

277277
### Use connection pooling
278278

279-
For database-heavy message handlers, use connection pooling to avoid connection overhead:
280-
281-
```php
282-
// Configure in your database connection
283-
$db = new Connection([
284-
'dsn' => 'mysql:host=localhost;dbname=mydb',
285-
'username' => 'user',
286-
'password' => 'pass',
287-
'attributes' => [
288-
PDO::ATTR_PERSISTENT => true, // Persistent connections
289-
],
290-
]);
291-
```
279+
For database-heavy message handlers, use an external connection pooler such as [PgBouncer](https://www.pgbouncer.org/) (PostgreSQL) or [ProxySQL](https://proxysql.com/) (MySQL/MariaDB). These sit between your workers and the database server, maintaining a pool of live connections and reusing them across requests — reducing connection overhead without requiring any application-level changes.
292280

293281
### Batch database operations
294282

0 commit comments

Comments
 (0)