# HG changeset patch # User Radek Brich # Date 1363707996 -3600 # Node ID d02a36d0a9b02b4f00add42e13d1b4a97580d0e4 # Parent 64c62ac8f65de0aa9b4b9baca16bf47f05014ee9 Update PgManager doc. diff -r 64c62ac8f65d -r d02a36d0a9b0 doc/pgmanager.rst --- a/doc/pgmanager.rst Tue Mar 19 16:45:37 2013 +0100 +++ b/doc/pgmanager.rst Tue Mar 19 16:46:36 2013 +0100 @@ -110,6 +110,20 @@ pgm.close_conn('listenconn') +Timeouts +-------- + +In production, it's very important to set reasonable timeouts for both connection +and query execution. Application should not freeze when database server gets out of reach. + +Both timeouts can be set using :meth:`create_conn`:: + + pgm.create_conn(host='127.0.0.1', dbname='test', + init_statement='SET statement_timeout TO 20000;', # in ms, so it's 20s + connect_timeout=20, # also 20s + isolation_level='autocommit') + + Methods -------