I'm using mod_dbd to access mysql. Since one of the queries I use is
executed on every request, I prepare it by using DBDPrepareSQL.

However, I don't know what to do if apr_dbd_pvselect using the
prepared statement returns 2013 (Lost connection). This happens when a
long interval passes between queries (8 hours). Obviously I can
increase the mysql timeout, but this isn't the most robust solution
since I'll never know for sure whether I've increased it enough.

The issue is that once the connection times out the prepared statement
cannot be used. Is it safe to create a new prepared statement with
apr_dbd_prepare and replace the defunct statement with apr_hash_set?
Do I need to do anything to make sure the old statement is properly
cleaned up?

In short, what is the right way to recover from a lost connection with mod_dbd?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to