diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-01-30 23:00:05 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-01-30 23:06:11 +0200 |
commit | 4fef83230e851189fd3541f095c47a952968a411 (patch) | |
tree | 021413ec3602ca4d0e0a0ee0f588d0a2782155ae /doc/vmod-dbrw.3 | |
parent | e946449ccf15a0f44f402b03812d31d5f8ef4f7b (diff) | |
download | vmod-dbrw-4fef83230e851189fd3541f095c47a952968a411.tar.gz vmod-dbrw-4fef83230e851189fd3541f095c47a952968a411.tar.bz2 |
Introduce connection idle timeout.
* NEWS: Updated.
* configure.ac: Version 2.2.90
* doc/vmod-dbrw.3: Document connection idle timeout.
* doc/vmod-dbrw.texi: Likewise.
* src/dbrw.h (dbrw_backend) <sql_idle_timeout>: New method.
(dbrw_config)<idle_timeout>: New member.
(dbrw_connection)<timestamp>: New member.
(sql_idle_timeout): New proto.
* src/mysql.c (vmod_mysql_data) <mysql>: Change storage.
All uses changed.
(s_mysql_idle_timeout): New function.
* src/sql.c (sql_idle_timeout): New function.
(sql_query): Update connection timestamp.
(sql_idle_timeout): New function.
* src/vmod_dbrw.c (dbrw_connection_get): Force disconnect if connection
remained idle for too long. Initialize cfg->idle_timeout.
(vmod_config): New parameter 'timeout='
Diffstat (limited to 'doc/vmod-dbrw.3')
-rw-r--r-- | doc/vmod-dbrw.3 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/vmod-dbrw.3 b/doc/vmod-dbrw.3 index 139fbab..6f1dba8 100644 --- a/doc/vmod-dbrw.3 +++ b/doc/vmod-dbrw.3 @@ -13,7 +13,7 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. -.TH VMOD-DBRW 1 "August 5, 2017" "VMOD-DBRW" "User Reference" +.TH VMOD-DBRW 1 "January 30, 2018" "VMOD-DBRW" "User Reference" .SH NAME vmod-dbrw \- Database-driven rewrite rules for Varnish Cache .SH SYNOPSIS @@ -99,6 +99,18 @@ section name is \fBclient\fR. Use secure connection to the database server via SSL. The \fIFILE\fR is a full pathname to the certificate authority file. .TP +\fBtimeout\fR=\fIN\fR +Sets idle timeout for a single connection (seconds). The connection +will be closed and opened again if the module is to use it after +\fIN\fR or more seconds since its last use. Set \fBtimeout=-1\fR to +disable idle timeout (sessions will remain open until the SQL +server closes them). Set \fBtimeout=0\fR to close the connection after +each request (not recommended). + +The default depends on the selected SQL backend. For MySQL, it equals +the value of the \fBwait_timeout\fR global variable. For PostgreSQL, +it is \fB-1\fR. +.TP \fBoptions\fR=\fISTRING\fR (\fBPostgres\fR-specific) Connection options. .TP |