Skip to content

Added JDatabaseDriver::disconnect() to support disconnecting from the database cleanly. #1189

merged 1 commit into from May 7, 2012

3 participants


This is useful when building applications with JApplicationDaemon because the database resource that gets copied after forking is shared between parent and child and if either of the processes close the connect, it is closed for both. With this, you can use the onFork event to disconnect and reconnect the database to get a new, unshared resource.

mahagr commented May 6, 2012

There's a related feature I've really would like to see in Joomla platform: reconnect/retry if database query fails because of the connection was cut by the server timeout. The most common reason is JInstaller extracting a large zip and trying to insert component without checking if the connection is still there.

@pasamio pasamio merged commit 1ef2ad6 into joomla:staging May 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.