Persistent Database Connections
Depending on the kind of server you have you may wish to disable persistent connections, especially if you tables tend to lock:
QUOTE |
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). |