[dev] category sql driver is potential harmful to database

Hubert Yeh cwyeh@pest.yichi.org
Sun, 6 Oct 2002 21:38:38 +0800


Hi, all:

   I'm happy to enable category function on my webmail. Since it works fine
and cool, I try to enable it on another webmail box, which is used by
thousands of users. Yap I know CVS head is potential dangerous on such a
heavy load, but some errors do error.

   The first error comes to me is "Commands out of sync;  You can't run this
command now".  Since I have no idea about that, I looked up MySQL manual but
still have no idea how to solve it. I try to restart mysql and apache
server, but error occured again soonly after users logged in.

   In order to make sure how many queries I have, I used ipfw to deny all
web connection besides mime. But I found one click on the mnemo icon might
produces one thousand queries! So I turn log level to LOG_DEBUG. Lots of
them seems to be the same. I'm wondering if there's something wrong with the
category driver, since most of queries are from [on line 180 of
"/usr/local/www/htmls/horde/lib/Category/sql.php"].

   Some data are listed in the following. Thanks.

cwyeh@pop3 [~] (21:19) mysqladmin status
Uptime: 4  Threads: 1  Questions: 1  Slow queries: 0  Opens: 6  Flush
tables: 1  Open tables: 0 Queries per second avg: 0.250
cwyeh@pop3 [~] (21:19) mysqladmin status
Uptime: 58  Threads: 3  Questions: 1816  Slow queries: 0  Opens: 8  Flush
tables: 1  Open tables: 2 Queries per second avg: 31.310
cwyeh@pop3 [~] (21:20)

BR
Chih-Wei Yeh