httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Jones" <>
Subject [users@httpd] mod_dbd and mysql
Date Thu, 19 Apr 2007 23:01:38 GMT
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?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message