From 0e43a89636f89d305ce0b24210930f19e6bd144f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Jul 2026 00:59:10 +0000 Subject: [PATCH] Document persistent MySQL worker pooling --- site/doc/pages/mysql_connect.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/doc/pages/mysql_connect.txt b/site/doc/pages/mysql_connect.txt index 3416a47..709f094 100644 --- a/site/doc/pages/mysql_connect.txt +++ b/site/doc/pages/mysql_connect.txt @@ -15,7 +15,7 @@ Establishes a connection to a MySQL server and returns a pointer to the connecti This connection handle is then used with helpers such as `mysql_query()`, `mysql_error()`, and `mysql_disconnect()`. -MySQL handles are request-scoped framework resources. Repeated `mysql_connect()` calls with the same host and credentials reuse one server connection within the current request. Each call creates a lease; `mysql_disconnect()` releases that lease, and UCE closes the pooled server connection during request cleanup. Never store a `MySQL*` in globals, sessions, or other state that can outlive the current request. +MySQL handles are request-scoped framework resources. Repeated `mysql_connect()` calls with the same host and credentials reuse one server connection within the current request. Each call creates a lease and `mysql_disconnect()` releases that lease. At request cleanup UCE returns the server connection to the current worker's persistent pool, then resets it before cross-request reuse. The pool holds up to `MYSQL_PERSISTENT_POOL_SIZE` connections per worker (default 8); set the size to 0 to disable cross-request reuse. Never store a `MySQL*` in globals, sessions, or other state that can outlive the current request. :example MySQL* db = mysql_connect();