Hello,
While learning PHP I came across the following warning in the php manual
and remembered one frequent error message in wikipedia (maximum number of
database connections exceeded...):
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 register_shutdown_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).
Do we actually use persistent connections and is this problem affecting
wikipedia?
greetings,
elian
--
Sex is hereditary. If your parents never had it,
chances are you won't either.
While learning PHP I came across the following warning in the php manual
and remembered one frequent error message in wikipedia (maximum number of
database connections exceeded...):
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 register_shutdown_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).
Do we actually use persistent connections and is this problem affecting
wikipedia?
greetings,
elian
--
Sex is hereditary. If your parents never had it,
chances are you won't either.