torben Tue Nov 20 22:00:09 2001 EDT
Modified files:
/phpdoc/en/features persistent-connections.xml
Log:
Added a warning about using persistent connections and table
locks/transactions together. The transaction note was from the user errata.
Index: phpdoc/en/features/persistent-connections.xml
diff -u phpdoc/en/features/persistent-connections.xml:1.14
phpdoc/en/features/persistent-connections.xml:1.15
--- phpdoc/en/features/persistent-connections.xml:1.14 Sat Nov 10 16:49:30 2001
+++ phpdoc/en/features/persistent-connections.xml Tue Nov 20 22:00:09 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<chapter id="features.persistent-connections">
<title>Persistent Database Connections</title>
@@ -98,6 +98,24 @@
may be rapidly swamped. Check your database documentation for
information on handling abandoned or idle connections.
</simpara>
+ <warning>
+ <simpara>
+ There are a couple of additional caveats to keep in mind when
+ using persistent connections. One is that when using table
+ locking on a persistent connection, if the script for whatever
+ reason cannot release the lock, then subsequent scripts using the
+ same connection will block indefinitely and may require that you
+ either restart the httpd server or the database server. Another is
+ that when using transactions, a transaction block will also carry
+ over to the next script which uses that connection if script execution
+ ends before the transaction block does. In either case, you can
+ use <function>register_shutdown_function</function> to register a
+ simple cleanup function to unlock your tables or roll back your
+ transactions. Better yet, avoid the problem entirely by not using
+ persistent connections in scripts which use table locks or
+ transactions (you can still use them elsewhere).
+ </simpara>
+ </warning>
<simpara>
An important summary. Persistent connections were designed to have
one-to-one mapping to regular connections. That means that you