Carl Bowden wrote:


> Yes all DB's have a common user and pass (its also the user
> mysqld process runs as) and i have mysql seet to a max of
> 1000 connections (sometimes it gets over 150 maxconnections)
> and the machine is not in heavy use yet

OK, that's ruled out then. What about the opposite, are the sites OK if 
you do have unique usernames for each (in which case no switching will 
occur)?

> Is there any where we may be able to check messages as to
> why the errors show?

I think you allready have loglevel set to debug, in which case, no.
But you could try to apply the attached patch, which should make 
midgard-lib more chatty about the failure.

> would it be fair to say that php is proberly not involed?

Yes. mod_midgard is the one that does the database juggling.

> if so, it must be mainly a midgard lib thing (re apache
> comment above) so we installed the 1.4.1-5 tarball(the ones
> just after the corrupt bzip's), is there any newer?

Nope.

> ( thats
> relavent) and could it have linked across anything in the
> LinuxPPC kit that may be an issue?

Not too likely.

Emile
Index: src/midgard.c
===================================================================
RCS file: /usr/local/cvs/midgard/lib/src/midgard.c,v
retrieving revision 1.15
diff -u -u -r1.15 midgard.c
--- src/midgard.c       2001/04/26 11:45:46     1.15
+++ src/midgard.c       2001/04/27 11:25:41
@@ -212,9 +212,16 @@
 
 int mgd_select_db(midgard * mgd, const char *database)
 {
+int errcode;
+
    assert(mgd);
    assert(database);
-   return (mysql_select_db(mgd->mysql, database) ? 0 : 1);
+
+       if ((errcode = mysql_select_db(mgd->mysql, database)) == 0) return 1;
+
+       fprintf(stderr, "Midgard: mgd_select_db(%s) failed: %s (%d)\n",
+               database, mysql_error(mgd->mysql), errcode);
+       return 0;
 }
 
 int mgd_assert_db_connection(midgard *mgd, const char *database,

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to