Topic on Project:Support desk

Deadlock found when trying to get lock??

11
Deletedaccount4567435 (talkcontribs)
A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: DELETE FROM `l10n_cache` WHERE lc_lang = 'zh-hant'
Function: LCStore_DB::startWrite
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (localhost)

I got database deadlock frequently these days. I tried run update.php through SSH many times, but this problem occurs frequently.

This problems only happened after I upgrade my site to 1.18

I am using hawkhost standard shared host. Less than 2000 people visit this site everyday. I believe it is not caused by excessive traffic.

Jasper Deng (talkcontribs)

From the non-developer meaning of deadlock, it sounds like your webhost is doing something here that affects something MediaWiki 1.18 needs.

88.130.80.237 (talkcontribs)

I also cannot help you directly, but technically a DB deadlock has the following background: MySQL does not logically check, if a part of a transaction really is caught in a deadlock (as this often could be rather expensive to determine). Instead MySQL checks, if a running query makes some progress. If it does not for a certain amount of time, simply speaking, MySQL just assumes that it would be caught in a deadlock and rolls it back in order to allow other queries to complete.

Jasper Deng (talkcontribs)

...which could mean a performance issue? Perhaps, but I need a DB expert's comment here.

Deletedaccount4567435 (talkcontribs)

I solved this problem by disable the Chinese simplified and traditional convert.

But it is inconvenient for traditional Chinese users.

Jasper Deng (talkcontribs)

OK, that means that your database was not configured with collation supporting Chinese characters.

Deletedaccount4567435 (talkcontribs)

How to set it to support Chinese character?

set to Binary?

Jasper Deng (talkcontribs)

That's a tough sell if you're using a shared webhost and also because you already have an existing wiki; binary is what I use but I've never used Chinese.

Deletedaccount4567435 (talkcontribs)

Any way, thank you all!!

88.130.89.230 (talkcontribs)

Using binary is an idea as there will be no charset conversion then when things are written into/read out of the database. Since MediaWiki internally always uses UTF-8, I think you should be able to switch from a UTF-8 collation to binary without changing any content in the DB. If you use a non-UTF-8 collation, you will have to convert your content to UTF-8 first.

Deletedaccount4567435 (talkcontribs)

Now the database is UTF-8

I am trying to switch it to binary.

Hoping it will solve this problem.

Reply to "Deadlock found when trying to get lock??"