[mirrorbrain-commits] r8326 - in /trunk: docs/ docs/installation/ mod_mirrorbrain/

From: <poeml_at_mirrorbrain.org>
Date: Sun, 12 Jan 2014 21:45:52 -0000
Author: poeml
Date: Sun Jan 12 22:45:51 2014
New Revision: 8326

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8326&view=rev
Log:
mod_mirrorbrain:
A solved problem, solved again... :-)
- If multiple instances of MirrorBrain run in Apache (or you have multiple vhosts 
  using one MirrorBrain configuration), you would have multiple ``DBDParams``
  statememts which prepare SQL statements when Apache starts processes.
  Peculiarly, Apache doesn't allow the same connection string used more than
  once. (To make the connection strings unique, a possible workaround is to
  use differing ``connect_timeout`` values.) Anyhow, to help users running
  into this problem, MirrorBrain used to log a warning (added in 2009). This
  warning was removed when the DBD error handling was reworked in 2.16.1
  (2012). It replaced with much more detailed error logging, but the helpful
  one-liner was missing hence. This release re-adds the helpful one-liner,
  and it'll also show the workaround at the same time. In addition, the
  documentation was enhanced. Thanks Stephan Jauernick.

Modified:
    trunk/docs/changes.rst
    trunk/docs/installation/debian.rst
    trunk/docs/installation/source.rst
    trunk/mod_mirrorbrain/mod_mirrorbrain.c

Modified: trunk/docs/changes.rst
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/docs/changes.rst?rev=8326&r1=8325&r2=8326&view=diff
==============================================================================
--- trunk/docs/changes.rst	(original)
+++ trunk/docs/changes.rst	Sun Jan 12 22:45:51 2014
_at_@ -33,6 +33,22 @@
     create_timestamp [username:groupname] timestampfile1 [timestampfile2...]
     
 * The installation documentation was updated in many places.
+
+* :program:`mod_mirrorbrain`
+
+  - If multiple instances of MirrorBrain run in Apache (or you have multiple vhosts 
+    using one MirrorBrain configuration), you would have multiple ``DBDParams``
+    statememts which prepare SQL statements when Apache starts processes.
+    Peculiarly, Apache doesn't allow the same connection string used more than
+    once. (To make the connection strings unique, a possible workaround is to
+    use differing ``connect_timeout`` values.) Anyhow, to help users running
+    into this problem, MirrorBrain used to log a warning (added in 2009). This
+    warning was removed when the DBD error handling was reworked in 2.16.1
+    (2012). It replaced with much more detailed error logging, but the helpful
+    one-liner was missing hence. This release re-adds the helpful one-liner,
+    and it'll also show the workaround at the same time. In addition, the
+    documentation was enhanced. Thanks Stephan Jauernick.
+    
 
 
 Bug fixes:

Modified: trunk/docs/installation/debian.rst
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/docs/installation/debian.rst?rev=8326&r1=8325&r2=8326&view=diff
==============================================================================
--- trunk/docs/installation/debian.rst	(original)
+++ trunk/docs/installation/debian.rst	Sun Jan 12 22:45:51 2014
_at_@ -145,6 +145,11 @@
    Edit the password in the template here -- take note of it, you'll need it
    below, when you create a database user account.
 
+.. note::
+   Important: DBDParams strings must be unique; you cannot use the same string
+   in another vhost. A possible workaround is to use differing connect_timeout
+   values.
+
 
 Install PostgreSQL
 ------------------

Modified: trunk/docs/installation/source.rst
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/docs/installation/source.rst?rev=8326&r1=8325&r2=8326&view=diff
==============================================================================
--- trunk/docs/installation/source.rst	(original)
+++ trunk/docs/installation/source.rst	Sun Jan 12 22:45:51 2014
_at_@ -241,7 +241,8 @@
           This matters if several MirrorBrain instances are set up in one
           Apache. If the database connection string is identical in
           different virtual hosts, mod_dbd may fail to associate the
-          connection string with the correct virtual host.
+          connection string with the correct virtual host. A possible
+          workaround is to use differing values in connect_timeout.
 
 
 

Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=8326&r1=8325&r2=8326&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c	(original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c	Sun Jan 12 22:45:51 2014
_at_@ -1987,7 +1987,10 @@
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 
                           "[mod_mirrorbrain] Could not get prepared statement labelled '%s'",
                           scfg->query_label);
-
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 
+                          "[mod_mirrorbrain] Hint: connection strings defined with "
+                          "DBDParams must be unique. The same string cannot be used "
+                          "in two vhosts. Workaround: use a differing connect_timeout parameter");
             /* log existing prepared statements. It might help with figuring out
              * misconfigurations */
             ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, 




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sun Jan 12 2014 - 21:45:54 GMT

This archive was generated by hypermail 2.3.0 : Sun Jan 12 2014 - 21:47:04 GMT