Update PgManager doc.
authorRadek Brich <radek.brich@devl.cz>
Tue, 19 Mar 2013 16:46:36 +0100
changeset 79 d02a36d0a9b0
parent 78 64c62ac8f65d
child 80 b830c6f7b30a
Update PgManager doc.
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
 -------