WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Serious MySQL Errors, please help! (15 posts)

  1. Jakets
    Member
    Posted 4 years ago #

    These are crashing my hosts server and my site is being taken offline. I have over 10,000 Page loads a day and cannot afford for the site to be taken offline.

    I have 2 Serious MySQL errors.

    Error 1: (Most Serious Error, no idea what is causing this one.)

    [22-Dec-2009 09:47:49] WordPress database error Got error 28 from storage engine for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (143) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

    Error 2: (This is caused by Yet Another Related Posts Plugin, I have disabled it till I can resolve the error.)

    [24-Dec-2009 02:49:19] WordPress database error Duplicate entry '115-0' for key 1 for query insert into wp_yarpp_related_cache (reference_ID,ID,score) values (115,0,0) made by require, require_once, do_feed, do_action, call_user_func_array, do_feed_rss2, load_template, require_once, the_excerpt_rss, apply_filters, call_user_func_array, yarpp_rss_excerpt, yarpp_related, yarpp_cache_enforce

    I would really appriciate help with the first error ASAP, this is really causing me problems. The second error is not as urgent but I would still like to use this plugin. Thanks!

    -Jake

  2. s_ha_dum
    Member
    Posted 4 years ago #

    Error 28 is a disk space error. You need to contact your host.

    The second error means that the software is trying to insert a row that has identical values to another row in the table in columns that have to be unique. I hope that made sense.

  3. Jakets
    Member
    Posted 4 years ago #

    @ apljdi:

    Ok I talked to my host and he cleared the TMP folder, this is what he said about error 1:

    Arkady [9:53:07 PM]: As I see there are a lot of session files created in tmp folder from your application, as example:
    [9:53:08 PM]: -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_93ab811165324db9b27fea766f75fb79
    -rw------- 1 jakets jakets 0 Dec 23 20:50 sess_98615e2244dbc4474f28f2cc1800d2e5
    -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_9c8e56b1d8aee7ae37523aed1a749a9a
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_9e29fd37e5f1eb4d6b217187ac4d0ed9
    -rw------- 1 jakets jakets 0 Dec 23 20:47 sess_9e430ea063ec4f10159a505e3b82f0c0
    -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_9e50dbce45f962f2f00f36b112c87d11
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_a2d3964d42fc345fb6f30f9fada1acd7
    -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_a35e6fabe147e0f2c87bde3aa68c585d
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_a4bc122e8be4532239f87a7df681bb13
    -rw------- 1 jakets jakets 33 Dec 23 20:48 sess_a6efc621025cd5e337939c379c5f9087
    -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_ab12e67525beb08d5cba2120e65def09
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_aeeb348394e242606f3aab9852081f78
    -rw------- 1 jakets jakets 0 Dec 23 20:50 sess_b1b5cf1a3865998b7f83028b777a37b9
    -rw------- 1 jakets jakets 0 Dec 23 20:51 sess_b3e12a33e1aaf90fd9790cdd33c09c1f
    -rw------- 1 jakets jakets 0 Dec 23 20:46 sess_bef6373ee29dd3299cbe61befaf472b2
    -rw------- 1 jakets jakets 0 Dec 23 20:51 sess_bf185ebbc08f06a538197bc1846c7624
    -rw------- 1 jakets jakets 0 Dec 23 20:47 sess_c35c01c02f34e42baa632182d65e6203
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_c41cc30f0cce3f2ac3fb64caa23d99a9
    -rw------- 1 jakets jakets 33 Dec 23 20:50 sess_c6cf453eb0fc37da3cbc1b7a66108209
    -rw------- 1 jakets jakets 0 Dec 23 20:45 sess_c713ba2f6c0fe043c92575edba785cb6
    -rw------- 1 jakets jakets 0 Dec 23 20:45 sess_c7401ef8ac00ef4816436f35b56c7a0b
    -rw------- 1 jakets jakets 0 Dec 23 20:52 sess_c8373e7a2815108a801e0ff109249cf7
    -rw------- 1 jakets jakets 33 Dec 23 20:45 sess_c9db9fb3365574bfe7596febfdbd50de
    -rw------- 1 jakets jakets 0 Dec 23 20:48 sess_caea8e52143bf584e645d83a0776ae3f
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_d08e1e776efa59b79811e5b414e96e32
    -rw------- 1 jakets jakets 0 Dec 23 20:49 sess_d1d4a51861ecd797063324a0d8547e56
    -rw------- 1 jakets jakets 0 Dec 23 20:47 sess_d369fed65607f441d2d4ecc534c8c67a
    -rw------- 1 jakets jakets 0 Dec 23 20:47 sess_d5c90d8116f72bd09b4672a653bff8a0
    -rw------- 1 jakets jakets 0 Dec 23 20:45 sess_d6a71a8226d075ba79ca27445d3239a3
    -rw------- 1 jakets jakets 0 Dec 23 20:51 sess_d8306a2cd31b420f7f58bf8e0c4a542b
    Jake [9:53:33 PM]: what causes this, why wouldn't they delete themselves?
    Arkady [9:54:18 PM]: Your application shouldn't create so much files, so it would be better to consult with application developers

    Ideas? They keep saying it has nothing to do with them...

  4. s_ha_dum
    Member
    Posted 4 years ago #

    why wouldn't they delete themselves?

    They should delete themselves. There are runtime configuration variables that should go a long way toward keeping those things cleaned up-- like session.gc_maxlifetime-- but there may be other ways of handling it.

    I just grep-ed my mostly clean 2.9 directory and can't find session_start. Since session_start must be run before sessions will work this means that WordPress isn't creating those session files. It must be a plugin or something in your theme. What plugins are your running? I think if you can find out what is calling sessions_start you can locate the origin of the problem.

  5. Jakets
    Member
    Posted 4 years ago #

    @ apljdi: Ok, I will list the plugins. In the meantime I have been tweaking, repairing, optimizing the DB. I also removed one plugin that was causing me some problems, but I am still getting the error 28 like mad. It has changed slightly however, so if this helps the error now looks like this:

    [26-Dec-2009 12:17:49] WordPress database error Got error 28 from storage engine for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (540, 455, 465, 388, 382, 349, 322, 313, 66, 135) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

    The bolded part changes occasionally, with different numbers.

    The plugins I am using are all the most current version available (no betas):

    ACTIVE:
    Avatars
    Clean Archives Reloaded
    Get Recent Comments
    Highlight Author Comments
    jQuery Comment Preview
    MaxBlogPress Ping Optimizer
    phpbb_recent_topics
    ShareThis
    SI CAPTCHA Anti-Spam
    Sidebar Login
    Twitter Tools
    Twitter Tools - Bit.ly URLs
    Who is Online
    WP-ContactForm
    WP-Polls
    WP Authors

    DEACTIVATED:
    Advertising Manager
    Akismet
    GD Star Rating
    Live Countdown Timer
    Twitter Tools - Exclude Category
    Twitter Tools - Hashtags

    I really appreciate the help, this is killing my site. If it helps the site is FarmVille Fanatic

    Here is a recent chat with my host:

    Jake [2:59:45 PM]: I have an error: WordPress database error Got error 28 from storage engine for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (143) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms
    [3:00:16 PM]: i have talked with dennis
    [3:00:23 PM]: i was told its my problem
    [3:00:30 PM]: he told me to check with the WP community
    [3:00:40 PM]: I have and multiple times i have been told it is a host issue
    [3:00:44 PM]: please check this thread:
    [3:00:53 PM]: http://wordpress.org/support/topic/344853?replies=1
    [3:01:32 PM]: the error is filling my log, and has caused my site to be shut down before by you (the host)
    Mike V [3:02:17 PM]: The first error as mentioned was space related, everything else is related to your wordpress install and not something we can really assist with.
    Jake [3:02:36 PM]: im only talking about the wp error 28
    [3:02:45 PM]: everywhere says it is on your end
    [3:02:54 PM]: even the mysql site itslef
    [3:03:00 PM]: i cannot fix this error
    Mike V [3:03:07 PM]: Delete your log files.
    [3:03:18 PM]: Or set up log rotation to delete them for you.
    [3:03:30 PM]: Or allocate more space to your site from your control panel.
    Jake [3:03:50 PM]: more space to my site?
    [3:04:04 PM]: 147.41 / 25000 MB
    [3:04:08 PM]: thats how much i am using
    [3:04:17 PM]: it has to do with the tmp space
    [3:04:50 PM]: please look at this: http://www.mysql.com/news-and-events/newsletter/2003-10/a0000000249.html
    Mike V [3:05:28 PM]: Something like that we can't increase on a per site basis, and the limits exist as a mysql restriction for a reason.
    Jake [3:05:29 PM]: the error happened less than 5 minutes after clearing my tmp folder and files
    Mike V [3:05:44 PM]: You're generating too much information in a very short time then.
    [3:05:57 PM]: We have hundreds of other wordpress sites on this server and none are having this issue.
    Jake [3:06:18 PM]: then how am i supposed to fix this? my install is nothing special
    Mike V [3:06:24 PM]: Apparently it is.
    Jake [3:06:28 PM]: i have been told again and again by wp community it is a host issue
    [3:06:41 PM]: and host tells me again and again its a wp error
    [3:06:45 PM]: so im in a bind here
    Mike V [3:06:53 PM]: And if it isn't something special, then uninstall and reinstall it.
    [3:07:09 PM]: You have something in your install that's causing this.
    Jake [3:07:53 PM]: is there no way to determine more than this? I dont really have a way to simply re-install it without destroying a lot of work
    [3:08:14 PM]: and if it continues to happen and everyone else says it is a host issue...
    [3:08:17 PM]: then what?
    [3:08:37 PM]: other hosts can increase the tmp size
    Mike V [3:08:45 PM]: The issue with everyone claiming its a host issue is that we'd have every other wordpress or mysql utilizing site generating similar errors.
    Jake [3:09:08 PM]: well i talked to this guy:
    [3:09:08 PM]: Alex P [1:54:36 AM]: Please hold on, I'm checking...
    Jake [1:54:44 AM]: ok
    Alex P [1:57:45 AM]: I've raised tmp_table_size for mysqld and you shouldn't experience such problems anymore.
    [3:09:14 PM]: this is your own host support
    [3:09:28 PM]: he didnt seem to have a problem with saying it could be raised
    [3:09:31 PM]: and claimed it was
    Mike V [3:09:35 PM]: I see the size increase.
    [3:09:42 PM]: Its at the highest we'd permit.
    Jake [3:09:46 PM]: you just said a bit ago you couldent do that
    [3:10:07 PM]: Mike V [3:05:28 PM]: Something like that we can't increase on a per site basis, and the limits exist as a mysql restriction for a reason.
    Mike V [3:10:32 PM]: He didn't increase it on a per site basis.
    [3:10:37 PM]: He increased it server wide.
    Jake [3:11:00 PM]: no one has been able to help me with this issue at all
    Mike V [3:11:04 PM]: What its at right now is the highest we'll be able to adjust it.
    Jake [3:11:06 PM]: is the tmp folder full?
    Mike V [3:11:22 PM]: You have to realize that no one else was having issues with their wordpress install at the original limits.
    [3:11:24 PM]: You were the only one.
    Jake [3:11:26 PM]: i had it cleared and within minutes the error continured to appear
    Mike V [3:11:32 PM]: This means something in your install is causing this issue.
    [3:12:14 PM]: We've adjusted any limits as high as we can really permit without risking abuse or performance issues on the server.
  6. s_ha_dum
    Member
    Posted 4 years ago #

    That query is a normal looking WP query but you are having trouble because something else has already eaten up the free space. I can't tell by looking at the plugins which one(s) are causing the problem, but you are running quite a few. You need to look through your plugin sources for the session_start() function. That should tell you which one(s) are using sessions and then work from there. You've got a broken plugin, incompatible plugins, or maybe just too many plugins creating sessions. Since apparently the tmp dir fills up in five minutes if you have the patience you could disable your plugins one by one. When you get more than five minutes before a failure you might have found the problem. That assumes, though, that the problem is only one plugin and not a combination of plugins. Looking through the sources is a much better plan though.

  7. Jakets
    Member
    Posted 4 years ago #

    I'm not sure how to look through the sources efficiantly. But I did give it a go and look through the main file on each plugin. I only found the session_start function in 1 plugin. This was the Captcha plugin. I have disabled it for now, cleared my error log and repaired the db. I also deleted my tmp folder contents again. Now I will just wait and see. However, this was the only place I could find that function, I find it hard to imagine that 1 tiny Captcha plugin was doing this much damage.

    Thanks for your help, I will report back in an hour or so, if its still occurring I'm not sure what to do besides go though plugins one at a time, which is not something I look forward too. I switched from b2evolution to WordPress for ease of use, I am starting to regret that decision...

  8. Jakets
    Member
    Posted 4 years ago #

    Yep still getting the error...

  9. s_ha_dum
    Member
    Posted 4 years ago #

    You need some tool that will search whole directories of files for a keyword. I use grep ( constantly ) but that runs on *nix. I'm sure there is something similar for Windows. In fact, someone here named such a program once but I can't remember what it was.

  10. Mark / t31os
    Moderator
    Posted 4 years ago #

    Notepad++ can search in files and supports various Operating systems.

    Also has regex capabilites for searching(optional).

  11. Jakets
    Member
    Posted 4 years ago #

    Alright, I already had Notepad++ so I ran the search on the entire plugin directory. I got 10 hits for session_start. 9 were in SI CAPTCHA Anti-Spam Plugin and 1 was in Advertising Manager. Both of these were already disabled (i found the call in SI earlier today and disabled it), I went ahead and deleted them entirely. I also repaired the DB again and Optimized it as well as clearing the error log. I will get back to you guys if the error persists.

  12. Jakets
    Member
    Posted 4 years ago #

    Still getting this:

    [27-Dec-2009 02:59:30] WordPress database error Got error 28 from storage engine for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (563, 557, 552, 545, 540) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

    There are no other plugins that I can find that call in. What next?

  13. Jakets
    Member
    Posted 4 years ago #

    Here's an image of my tables, in case anyone sees anything that may help or is out of place: Tables Image

  14. Jakets
    Member
    Posted 4 years ago #

    out of curiosity, could anything in my .htaccess cause this? If not is there anything wrong or redundant in it that I should adjust?

    RewriteEngine on
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    #The next line modified by DenyIP
    order allow,deny
    #The next line modified by DenyIP
    #deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName farmvillefanatic.com
    
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    
    RewriteCond %{HTTP_REFERER} !^http://farmvillefanatic.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://farmvillefanatic.com$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.farmvillefanatic.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.farmvillefanatic.com$      [NC]
    RewriteRule .*\.(jpg|jpeg|png|bmp)$ - [F,NC]
    
    Options All -Indexes
    Redirect 301 /pages/chat.html http://farmvillefanatic.com/chat/
    
    # Redirect anything that's not an existing directory or file to index.php:
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^  index.php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Here is the latest conversation with my host:

    Arkady [10:56:36 PM]: Hello, my name is Arkady. Welcome to our real-time support chat. How can I help you today?
    Jake [10:56:36 PM]: What is this? Disk /dev/loop0 (/var/tmp)
    [10:57:10 PM]: I notice it shoot up to 100% sometimes and then back to 3% then 40, 70 100 again
    [10:57:31 PM]: im am still having a serious error on mysql I cannot resolve
    [10:57:53 PM]: I have a thread going here: http://wordpress.org/support/topic/344853?replies=1
    [10:58:03 PM]: and have found no way to resolve it yet
    [10:58:41 PM]: is there any way you can help me in figuring out what is causing this?
    Arkady [11:00:12 PM]: Hold on and let me check
    Jake [11:00:17 PM]: ok
    Arkady [11:11:04 PM]: I've checked and can't see any problems on server side which can cause such an issue, so I suggest you to continue investigation with your web application developers on their official site and let us know if anything should be changed/adjusted from server side in order to resolve your problem
    Jake [11:11:28 PM]: ok, i figured as much. I just havent had any luck at all on my side
    [11:11:42 PM]: thanks
    Arkady [11:11:51 PM]: You are welcome
  15. Jakets
    Member
    Posted 4 years ago #

    Well for anyone following this, Im pretty sure I corrected the error finally. It's strange and I would love an explanation on why this worked. What I did was move my sessions save path... Thats it. I have been error free for over 5 hours. Normally I was error free for no more than 10 minutes tops. I have re-installed and activated my plugins, and everything is working great with no error.

    Doesn't this mean it was exactly what I thought all along? That this was a host side error from the session folder being filled up? I noticed a plugin (si Captcha) that was creating hundreds of session files at a time (all 0 bytes with no data) I removed this addon, but even with it enabled it was still error free in the new session path.

    Either way, thanks for all the help everyone. I have trimmed my plugins down a bit and am now happy to no longer be destroying the hosts servers.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags