• Resolved agovella

    (@agovella)


    I’ve been receiving this error intermittently, but it apprears to have returned and won’t leave. The full error message:

    WordPress database error: [Got error 12 from storage engine]
    SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM wp_posts WHERE post_date < ‘2005-05-04 00:09:12’ AND post_status = ‘publish’ GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC

Viewing 13 replies - 1 through 13 (of 13 total)
  • I did a google search for “Got error 12 from storage engine”. The second result was this:
    https://lists.mysql.com/mysql/182918

    Error 12 = Cannot allocate memory

    Your server is running out of free memory. This is not a WordPress specific problem.

    If you do a search on these forums, there are a number of threads on “Error 12.”

    Basically, you need to call your host and have them sort out the MySQL server.

    Some users have reported success by using “Repair Tables” in PHPMyAdmin.

    My site and others on my host continue to get these errors intermittently:

    WordPress database error: [Got error 12 from storage engine]
    SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM wp_posts WHERE post_date < '2005-05-04 00:09:12' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC

    We’ve discussed this with our admins and, in their opinion, ita€?s because “WP needs to optimize GROUP queries on multi-year posts”. This is an issue that they have already pointed out to Matt.

    I have a lot of confidence in my hosting provider and don’t believe our servers or configuration are at fault. I’d really appreciate some feedback from the WP developers about these errors.

    It’s not a matter of anyone being ‘at fault’. It’s not necessarily a poor configuration from your server, nor is it necessarily poor coding from WordPress.

    The server is running out of free RAM. There are lots of solutions to this problem. Obviously, more RAM (or less customers) for the server is one. Another would be to possibly trim templates / themes to reduce the kinds of queries listed above (looks like a yearly archive view, which could conceivably generate a LOT of data).

    Sorry, I didn’t mean to point the finger. I realize there are a lot of factors at play here.

    Now, the error is not from a yearly archive view — it occurs right on my front page. My site is barebones in terms of themes/templates. I don’t even use comments or trackbacks. The server on which it’s hosted is new and not overloaded with accounts. (When I said that I have a lot of confidence in my host, it’s because everything they do is aimed at providing the best possible platform.)

    This error doesn’t happen a lot and it’s not reproducible in any practical way. But it does happen and it’s frustrating.

    Now, the error is not from a yearly archive view — it occurs right on my front page.

    Actually, I take that back. It is happening on my front page, but my front page displays all posts — so, yes, I guess it is a yearly archive view.

    I’ll work on limiting it to the last couple of weeks and see if that helps.

    Right after upgrading to 1.5.1.1 I got Error 12:

    WordPress database error: [Got error 12 from storage engine]
    ALTER TABLE wp_posts ADD INDEX ( post_name )

    WordPress database error: [Got error 12 from storage engine]
    ALTER TABLE wp_posts ADD INDEX ( post_status )
    Step 1

    There’s actually only one step. So if you see this, you’re done. Have fun!

    Even after repairing tables and optimizing tables. Same error when running upgrade.php

    WP seems to be running fine, though. And if it’s a memory error on the server, that’s my host’s fault. I’ll tell them.

    Moderator James Huff

    (@macmanx)

    Yes, macmanx, that’s how I found this thread.

    Moderator James Huff

    (@macmanx)

    Congratulations. My apologies for doing what I thought might be helpful. I won’t do it again.

    https://forum.textdrive.com/viewtopic.php?pid=33317#p33317

    Apparently, the upgrade.php uses a bit of memory.

    I encountered this bug on an airline site we wrote and maintain. The site is served from a few machines and a load balancer, we have no appreciable memory issues. As such, I think we can agree it is not a memory problem.

    Upgrading from mysql v4.1.10a to v4.1.13 has solved this issue for us. I am fairly certain it is a mysql bug.

    As a point of interest, the less you listen to your hosting company about technical issues, the better. They will lie through their teeth to blame their problems on anything but themselves.

    HTH

    I was having the same issue. When I did repair tables, that solved the problem. Thanks so much!! =D

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WordPress database error: [Got error 12 from storage engine]’ is closed to new replies.