We've been getting this a lot lately at EcoliWiki:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: INSERT IGNORE INTO `objectcache` (keyname,value,exptime) VALUES ('colipedia:sitenotice','U��N�0D�| �ʗ����Jj7�U��pA���N�.! ���B�Fow4����_�8�iv�y�V�t(�% (ﰣ(\0#�2j=B�z���6��������C '�=�f�G�4�?�ծ� U � �Ǚ@��tO��x���3γ���b��_��2��& "~#\n���)�9�^��S�g1���
� a � 5 � 8K � #= g � x ^ � 7 � | ]M W � � � � � T � *Э � � ˻ � d � Y � kN �z�0UK�Y˦�ɖٞ��m��t����','20080704213140') from within function "MediaWikiBagOStuff::_doinsert". MySQL returned error "1213: Deadlock found when trying to get lock; try restarting transaction (trimer.local)".
I'm suspecting that it's related to some kind of optimization I need to do on MySQL, but could there be something about the sitenotice that causes it? There's an extension call in the Sitenotice to add an image. Advice would be appreciated.
MediaWiki 1.12.0 PHP 5.2.4 (apache) MySQL 5.0.41 Mac OSX Server 10.4
Traffic doesn't seem particularly high, and the cpus are not breaking a sweat.
Thanks.
JH
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
Jim Hu wrote:
We've been getting this a lot lately at EcoliWiki:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: INSERT IGNORE INTO `objectcache` (keyname,value,exptime) VALUES ('colipedia:sitenotice','U��N�0D�|
You should switch to memcached. That would avoid the query and improve performance at the same time. It's quite plausible that the extra locks introduced into transactions by objectcache would cause deadlocks.
-- Tim Starling
Thanks, Tim. I installed it and we'll see if it cures the problem. Whether or not it does, I see an immediate improvement in performance that's impressive. For any lurkers who are running MW on Mac OSX, this site has a link to an installer shell script for some of the prereqs.
http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment
This allows you to avoid fink (which I don't like). I stopped after the shell installer for memcached, as I understand it MW already has the PHP part.
I confess that I had been scared off of memcached by some of the stuff in the memcached.txt documentation about security, and the statement about it not being worth it for a small site. I think I misread that as small in terms of users rather than small in terms of pages. We've grown the latter very quickly on our wikis.
Jim
On Jul 5, 2008, at 7:57 PM, Tim Starling wrote:
Jim Hu wrote:
We've been getting this a lot lately at EcoliWiki:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: INSERT IGNORE INTO `objectcache` (keyname,value,exptime) VALUES ('colipedia:sitenotice','U��N�0D�|
You should switch to memcached. That would avoid the query and improve performance at the same time. It's quite plausible that the extra locks introduced into transactions by objectcache would cause deadlocks.
-- Tim Starling
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
Jim Hu wrote:
Thanks, Tim. I installed it and we'll see if it cures the problem. Whether or not it does, I see an immediate improvement in performance that's impressive. For any lurkers who are running MW on Mac OSX, this site has a link to an installer shell script for some of the prereqs.
http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment
This allows you to avoid fink (which I don't like). I stopped after the shell installer for memcached, as I understand it MW already has the PHP part.
I confess that I had been scared off of memcached by some of the stuff in the memcached.txt documentation about security, and the statement about it not being worth it for a small site. I think I misread that as small in terms of users rather than small in terms of pages. We've grown the latter very quickly on our wikis.
The security warning is actually out of date, it's not possible to run arbitrary SQL queries from the web anymore, and there's no such thing as "developer access". We're not actually sure what sort of escalation is possible, because there are a lot of miscellaneous uses of memcached and we haven't done a proper security review. So I'd definitely still recommend firewalling it.
As for the idea that it's "more trouble than a small site will need", maybe that statement predated the inclusion of memcached in the linux distros. I set up memcached on my local test wiki in about 2 minutes, with "apt-get install memcached".
-- Tim Starling
mediawiki-l@lists.wikimedia.org