# [MediaWiki-l] Database size ballooning?

 Classic List Threaded
14 messages
Reply | Threaded
Open this post in threaded view
|

## [MediaWiki-l] Database size ballooning?

 Hi, Our database quadrupled in size, from 220 MB in March to 933 MB in September, for a MediaWiki 1.20.2 that I host for a friend on a shared hosting account at Dathorn.com. I suspect something may be wrong because the wiki's content has not grown much at all in this same time. The wiki is Teflpedia.com. http://teflpedia.com/Special:Version shows: MediaWiki 1.20.2 PHP 5.3.27 (litespeed) MySQL 5.5.32-cll Anyone have a clue what may be causing our database to balloon, or tips what I should check? Thanks, Roger _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 On Wed, Sep 4, 2013 at 2:50 PM, <[hidden email]> wrote: > Our database quadrupled in size, from 220 MB in March to 933 MB in > September, for a MediaWiki 1.20.2 that I host for a friend on a shared > hosting account at Dathorn.com. I suspect something may be wrong > because the wiki's content has not grown much at all in this same > time. > > The wiki is Teflpedia.com. > > http://teflpedia.com/Special:Version shows: > MediaWiki 1.20.2 > PHP 5.3.27 (litespeed) > MySQL 5.5.32-cll > > Anyone have a clue what may be causing our database to balloon, or > tips what I should check? > Maybe because of cache that is generated. I notice something similar. After run "update.php" it clear the cache on the database and it went from 800M to 210M. When happened I thought I had lost some data. -- []'s Camponez _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 In reply to this post by Roger_Chrisman People clicking, changing one word, or punctuation, and then saving it. Over, and over, and over, and over       -----Original Message----- From: roger <[hidden email]> To: MediaWiki announcements and site admin list <[hidden email]> Sent: Wed, Sep 4, 2013 10:59 am Subject: [MediaWiki-l] Database size ballooning? Hi, Our database quadrupled in size, from 220 MB in March to 933 MB in September, for a MediaWiki 1.20.2 that I host for a friend on a shared hosting account at Dathorn.com. I suspect something may be wrong because the wiki's content has not grown much at all in this same time. The wiki is Teflpedia.com. http://teflpedia.com/Special:Version shows: MediaWiki 1.20.2 PHP 5.3.27 (litespeed) MySQL 5.5.32-cll Anyone have a clue what may be causing our database to balloon, or tips what I should check? Thanks, Roger _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l  _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 In reply to this post by Camponez On Wed, Sep 4, 2013 at 10:54 AM, Camponez <[hidden email]> wrote: > Maybe because of cache that is generated. > > I notice something similar. After run "update.php" it clear the cache on > the database and it went from 800M to 210M. When happened I thought I had > lost some data. Cache _in_ the database? What does MediaWiki 1.20.2 cache in the database? Roger _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 On Wed, Sep 4, 2013 at 11:47 AM, <[hidden email]> wrote: > On Wed, Sep 4, 2013 at 10:54 AM, Camponez <[hidden email]> wrote: > > Maybe because of cache that is generated. > > > > I notice something similar. After run "update.php" it clear the cache on > > the database and it went from 800M to 210M. When happened I thought I had > > lost some data. > > Cache _in_ the database? What does MediaWiki 1.20.2 cache in the database? > > At the very least localization and parser out of the box. Of course you can configure this stuff to be cached elsewhere if you'd like :) -Chad _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 Are there any maintenance scripts I should routinely run, maybe once a months? Roger _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 If you don't care about keeping old revisions and deleted revisions around (or are not obligated to keep revision around due to your wiki license), you should probably run these two scripts every so often: https://www.mediawiki.org/wiki/Manual:DeleteArchivedRevisions.phphttps://www.mediawiki.org/wiki/Manual:DeleteOldRevisions.phpThis can hammer down the size of your database quite a bit if you have many pages with a lot of revisions. If you have server access, have deleted pictures, and don't care to retrieve them later, you can always permanently delete those to recover some more space. If you have a copy of PHPMyAdmin running and you uninstalled some extensions that left some database tables with lots of leftover data you never plan to use, you can delete those to free up some more space, though I'd back up your database before doing so. > Date: Wed, 4 Sep 2013 12:18:13 -0700 > From: [hidden email] > To: [hidden email] > Subject: Re: [MediaWiki-l] Database size ballooning? > > Are there any maintenance scripts I should routinely run, maybe once a months? > > Roger > > _______________________________________________ > MediaWiki-l mailing list > [hidden email] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l      _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 On Wed, Sep 4, 2013 at 2:09 PM, Arcane 21 <[hidden email]> wrote: > If you have a copy of PHPMyAdmin running and you uninstalled some > extensions that left some database tables with lots of leftover data you > never plan to use, you can delete those to free up some more space, though > I'd back up your database before doing so. > > If you have a copy of PhpMyAdmin installed you should uninstall it immediately as it is a horrible security risk to any production server it is on. -Chad _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 Hi, in case the biggest table in your database is objectcache, you may be suffering from this issue: https://bugzilla.wikimedia.org/show_bug.cgi?id=42094In such case a good solution is to configure your wiki to use memcache instead of database for cache. See https://www.mediawiki.org/wiki/Memcached for details. Cheers, Zbynek On Wed, Sep 4, 2013 at 11:13 PM, Chad <[hidden email]> wrote: > On Wed, Sep 4, 2013 at 2:09 PM, Arcane 21 <[hidden email]> wrote: > > > If you have a copy of PHPMyAdmin running and you uninstalled some > > extensions that left some database tables with lots of leftover data you > > never plan to use, you can delete those to free up some more space, > though > > I'd back up your database before doing so. > > > > > If you have a copy of PhpMyAdmin installed you should uninstall it > immediately > as it is a horrible security risk to any production server it is on. > > -Chad > _______________________________________________ > MediaWiki-l mailing list > [hidden email] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l> _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 Thanks for your replies. Camponez suggests I run update.php[1] which I believe among other things dumps the objectcache table[2]. In the past I have only run update.php after an upgrade. But it ran on those occasions without incident. So I would feel fairly safe running it now, to see if that brings the database back down to size. If it does, I may run it monthly before each monthly backup so that the backups are not bigger than necessary. Does update.php sound like a good first thing to try to brings the database back down to size? [1] https://www.mediawiki.org/wiki/Manual:Update.php[2] https://www.mediawiki.org/wiki/Objectcache_tableRoger _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 I fixed it. Per Camponez's suggestion, I ran update.php on a test version of the site and that fixed the bloat there. So I ran update.php on production Teflpedia site also. It cleared the objectcache table, which had grown to 743 MB, back to zero which brings the database back down to expected size. The database is now 148 MB instead of 933 MB. I think I will routinely run update.php before backing up the database from now on and that should take care of it. I suspect this bit in LocalSettings.php, which sets $wgMainCacheType to CACHE_DB, may have started this cache bloat building back in February 2012: ## Shared memory settings # Roger 21 Feb 2012 comments out original line below to try another value # so that 3rd badlogin will trigger ConfirmEdit captcha #$wgMainCacheType    = CACHE_NONE; $wgMainCacheType = CACHE_DB; // yea! badlogin trigger works with this$wgMemCachedServers = array(); It appears that using the database as a chache works fine, as long as I clear the cache from time to time. Running update.php once a month as part of my backup routine will do the job I think. Unless someone points me at a better way. Thank you everyone for your replies and tips! Once again, Mediawiki-l shines. Roger :-) _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: Database size ballooning?

 In reply to this post by Roger_Chrisman On 04/09/13 18:50, [hidden email] wrote: > Anyone have a clue what may be causing our database to balloon, or > tips what I should check? I have looked at issue with the mysql engine. " MyISAM versus InnoDB" http://stackoverflow.com/questions/20148/myisam-versus-innodband "InnoDB Table Bloat, Performance, and New Row Formats in 5.x" http://burtonator.wordpress.com/2007/07/02/innodb-table-bloat-performance-and-new-row-formats-in-5x/As I recall InnoDB never shrinks on the disk, even when you delete tables.... Could that be an issue? Gordo _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## [MediaWiki-l] With MathJax extension, Tex equations are displayed OK, but not MathML

 Hi, I have set-up a wiki at http://wiki.x2592.com and installed (among other things) the MathJax extension (https://www.mediawiki.org/wiki/Extension:MathJax). (I originally tried with the Math extension, but did not manage to get it working, despite the fact that all the prerequisites seem to be met.) MathJax is displaying Tex-encoded equations OK, but not MathML-encoded equations. The greater-than and less-than characters in MathML tags seem to be being converted to the HTML entities &ls and >. I'm working with a local git checkout of the MathJax package (although the results were identical using their CDN-delivered version), and a one-week-old git checkout of MediaWiki and the extensions repository. The MW MathJax is the version available as of 7 days ago, too. The invocation string used to call MathJax is: http://wiki.x2592.com/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMMLExamples of equations and other supported content can be seen on the main page of http://wiki.x2592.com, showing the problem, and the page is currently enabled for editing for anyone that feels like dabbling. Is anyone able to help me troubleshoot this and get MathML displaying OK? Many TIA if so, :-) -- Dave _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

## Re: With MathJax extension, Tex equations are displayed OK, but not MathML

 It might be useful to add that I started a thread about this in the MathJax discussion group: https://groups.google.com/forum/#!topic/mathjax-users/ZSVVy0Gs0nY-- Dave On 2013-09-06 19:29, [hidden email] wrote: > Hi, > > I have set-up a wiki at http://wiki.x2592.com and installed (among > other things) the MathJax extension > (https://www.mediawiki.org/wiki/Extension:MathJax). (I originally > tried with the Math extension, but did not manage to get it working, > despite the fact that all the prerequisites seem to be met.) > > MathJax is displaying Tex-encoded equations OK, but not MathML-encoded > equations. The greater-than and less-than characters in MathML tags > seem to be being converted to the HTML entities &ls and >. > > I'm working with a local git checkout of the MathJax package (although > the results were identical using their CDN-delivered version), and a > one-week-old git checkout of MediaWiki and the extensions repository. > The MW MathJax is the version available as of 7 days ago, too. > > The invocation string used to call MathJax is: > > http://wiki.x2592.com/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML> > Examples of equations and other supported content can be seen on the > main page of http://wiki.x2592.com, showing the problem, and the page > is currently enabled for editing for anyone that feels like dabbling. > > Is anyone able to help me troubleshoot this and get MathML displaying > OK? > > Many TIA if so, :-) > > -- > Dave _______________________________________________ MediaWiki-l mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l