problem with mysql

Robert Marchand robert.marchand@UMontreal.CA
Thu, 16 Nov 2000 11:39:52 -0500


Hi,

This is a follow-up to my previous message about a lockup with 
Apache/IMP/PHP/mysql.

I've now found it is a problem with mysql. The problem always occurs
when an update sql request locks up for a reason unknown to me and
then all subsequent sql request (like the select's) are waiting for it
to complete. 

At first the only thing to do was to restart both Apache and mysql. Now,
I just need to kill the 'update' threads in mysql and all returns to
normal.

Here is some output from mysqladmin when it occurs:

| 97  | hordemgr | localhost | horde | Query   | 47   | Locked | SELECT val
FROM active_sessions WHERE sid  = '411f036acaa9b813e148f9b3b0894ffb' AND
name = 'HordeSes |
| 98  | hordemgr | localhost | horde | Query   | 49   | Locked | SELECT val
FROM active_sessions WHERE sid  = '7378d44431b10b801b89ef9a9703c371' AND
name = 'HordeSes |

| 99  | hordemgr | localhost | horde | Query   | 142  | Locked | update
active_sessions set
val='base64:JHRoaXMtPmluID0gJyc7ICR0aGlzLT5wdCA9IGFycmF5KCk7IA==', change |
...
| 144 | hordemgr | localhost | horde | Killed  | 142  | Locked | update
active_sessions set
val='base64:JHRoaXMtPmluID0gJyc7ICR0aGlzLT5wdCA9IGFycmF5KCk7IA==', change |
...
| 167 | hordemgr | localhost | horde | Query   | 6    | Locked | SELECT val
FROM active_sessions WHERE sid  = 'c3af77fd5b1549ef00a333a7bbb8a15c' AND
name = 'HordeSes |
| 168 | root     | localhost |       | Query   | 0    |        | show
processlist

Here there were two 'update' requests to kill before everything return
to normal.

I've tried several things with no success including --skip-locking.

Here is my configuration:
SGI IRIX 6.5
PHP 4.03pl1
mysql 3.22.32
Apache 1.3.14
Horde 1.2.3/IMP 2.2.3

The reason I post here is that this seem to always occurs with the
'active_sessions' table and that it is a new problem since we've moved
to php 4.03pl1 and Imp 2.2.3.  Could there be a changed in these that
triggers the bug in mysql?  Could a patch in the IMP code prevent this?

My guess (apart from a real lock problem in mysql) is that the 'update'
request fail for a reason and that the locked state is not release.
Can that be?

What are other things I can try?
Remove persistents connections in php.ini? Will IMP still work? 
Will performance suffer?
Remove 'lock tables' in phplib?

I will also post in the mysql list but any help would be appreciated.

Thanks.

-------
Robert Marchand                 tél: 343-6111 poste 5210
DGTIC-SIT                       e-mail: robert.marchand@umontreal.ca
Université de Montréal          Montréal, Canada