Re: [pear-webmaster] MySQL table crashed today
| From: | Daniel O'Connor | Date: | Mon, 31 Oct 2011 00:15:03 +0000 |
| Subject: | Re: [pear-webmaster] MySQL table crashed today | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-6936@lists.php.net to get a copy of this message | ||
On Thu, Oct 20, 2011 at 12:27 AM, Brett Bieber <brett.bieber@gmail.com>wrote:
> Users on #PEAR, and the pear mailing list, reported an error downloading
> packages today.
>
> I logged into the server, and looked in the httpd error_log, and noticed
> two
> errors immediately:
>
> [Wed Oct 19 15:41:31 2011] [error] [client XXXXXX] PHP Fatal error: Call
> to
> a member function getLastActivity() on a non-object in
> /var/www/html/pearweb/pear.php.net/public_html/bugs/report.php on line 480
> [Wed Oct 19 15:41:34 2011] [error] [client XXXXXX] pearweb errorhandler: DB
> Error: unknown error... \n SELECT\n
> packages.name,
> releases.version, downloads,\n
> downloads/(CEIL((unix_timestamp(NOW()) -
> unix_timestamp(releases.releasedate))/86400)) as d\n FROM
> releases, packages, aggregated_package_stats a\n
> WHERE\n packages.name <> "pearweb"
> AND\n packages.name <> "pearweb_phars"
> AND\n packages.id = releases.package
> AND\n packages.package_type = 'pear'
> AND\n a.release_id = releases.id AND\n
> a.package_id = packages.id AND\n packages.newpk_id IS
> NULL AND\n packages.unmaintained = 0
> AND\n a.yearmonth = "2011-10-01
> 00:00:00"\n ORDER BY d DESC LIMIT 0, 5 [nativecode=145 **
> Table './pear/aggregated_package_stats' is marked as crashed and should be
> repaired], referer: XXXXXXXX
>
> I stopped Apache, logged in as mysql root, and ran:
> > repair table pear.aggregated_package_stats;
>
> After that, started Apache again, and the website appears to be functioning
> correctly.
>
> It would appear that the package download statistics, which are stored in
> the db, could interfere with package downloads in the event that the
> database fails. Perhaps we should look into alternative ways of storing the
> download statistics?
Perhaps - but maybe there are better ways to go about fixing this.
Frankly; I distrust myisam immensely.
Provided the DB has innodb enabled as an engine; I think it's worth
migrating all of the tables over to it - do test.pear.php.net first; then
pear.php.net.