Hi, Guys
I am doing Olio-php-0.1 load testing. Currently with 10000 users, the
apache logs showed "Lock wait timeout" error as below. PS. 9500 users
was passed.
[Mon Aug 24 15:31:00 2009] [error] [client 192.168.224.1] exception
'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock
wait timeout exceeded; try restarting transaction' in
/var/www/oliophp/classes/PDOConnection.php:77\nStack trace:\n#0
/var/www/oliophp/classes/PDOConnection.php(77): PDO->exec('update
SOCIALEV...')\n#1
/var/www/oliophp/public_html/addEventResult.php(101):
PDOConnection->exec('update SOCIALEV...')\n#2 {main}
... ...
>From mysql "show innodb status" and "show processlist", the query
statement of "update SOCIALEVENTTAG set refcount = refcount + 1 where
tag='$tag'" were executing long time and the executing time were
continuted to increase.
In the AddEventResult.php code, I found the comment of "// We need to
sort the tags before insert/update. Different tag sequences can lead
to deadlocks." I checked the change log that coming from OLIO-45
issue. However I still can't fully understand why there are deadlocks
happnened? Will different transactions calling to AddEventResult.php
get the same tag record log sequence? Can anyone explicate a bit more?
I just suspect the "lock wait timeout" maybe also be caused by the
same possible dead lock.
Thx, Xuekun