Aiwa Posted November 16, 2012 Share Posted November 16, 2012 Error: 2006 - MySQL server has gone away I don't pretend to be knowledgeable about MySQL configurations.... I've gotten the above error MULTIPLE times per day, about 3-5 every day for the past 2-3 months... My host says everything's hunky dory with the MySQL server and even increased my timeout to 120 sec... They refuse to help because I have no clue how to reproduce the issue... Just that it happens randomly... I'm running IPC as my homepage, so there are about 45 queries on the main page.. 99.9% of the time this is the query that's returning with the error.. mySQL query error: UPDATE ibf_ccs_blocks SET block_cache_output='',block_cache_last=1352768860 WHERE block_id=48 Block 48 is my RSS Feed block... <div class='maintitle'>Gaming News</div> <div class='ipsBox table_wrap'> <div class='ipsBox_container'> <table class='ipb_table'> <if test="is_array( $records ) && count( $records )"> <foreach loop="$records as $k => $r"> <tr><td class='row2'> <script type="text/javascript"> function picksPopup( rssid ){ new ipb.Popup( 'hiddencontent', {type: 'pane', modal: true, w: '650px', h: 500, initial: $('hiddencontent_' + rssid).innerHTML, hideAtStart: false, close: '.cancel' } ); }; </script> <ul> <li><a href="#" onclick="picksPopup( {$k} );">{$r['title']}</a> <br /><span class='date'><abbr class="published" title="{parse expression="date( 'c', $r['date'] )"}">{parse date="$r['date']" format="short"}</abbr></span> </li> </ul> <div id='hiddencontent_{$k}' style='display:none;'> <table class='ipb_table'> <tr class='header'> <th scope='col'><a href="{$r['url']}" target="_blank">{$r['title']}</a></th> </tr><tr> <td class='row1'>{$r['content']}</td> </tr> </table> </div> </td></tr> </foreach> </if> {parse block="tac_rss2"} {parse block="tac_rss3"} </table> </div> </div> With 2 other nested blocks in it... (The code is basically the same)... I'm not stipping HTML from the RSS feed content, so the only thing I can think of is there's something in the content of the feed that's causing an issue... Does anyone have any idea of why I'd be seeing this issue? I'm at a complete loss as to why this is happening... The error is not persistent, so the majority of the time it works fine... Just every now and then it throws the error... But a refresh of the page, the EXACT same content as the first call, it works.... Link to comment Share on other sites More sharing options...
GreenLinks Posted November 17, 2012 Share Posted November 17, 2012 Are you using InnoDB or Myisam ? Please also supply following values : interactive_timeout connect_timeout Also make sure you are not logging slow queries or make sure if you do , you are rotating log file constantly. Link to comment Share on other sites More sharing options...
Aiwa Posted November 17, 2012 Author Share Posted November 17, 2012 Myisam connect_timeout = 120 (they already upped that from 60 along with default_socket_timeout ) not sure what interactive_timeout is... I've got my host running a log of slow queries now... Hopefully something will turn up in the next day or so... Link to comment Share on other sites More sharing options...
KevinMc Posted November 20, 2012 Share Posted November 20, 2012 I've had this before. What's your PHP memory limit set to on your server? Link to comment Share on other sites More sharing options...
Rhett Posted November 20, 2012 Share Posted November 20, 2012 In short this means your site lost the connection to the mysql server, this can be caused by many things really. A long query that isn't completing before hitting the timeout setting as mentioned above. A very busy mysql server that is slow with a high i/o perhaps that is causing it to backup on queries A poorly coded hook or content block You are on the right path, a slow log should tell you what's happening here if it's an issue with your site Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted November 20, 2012 Share Posted November 20, 2012 Adding further - you mention it's an RSS Feed block, so it could be that the connection to fetch the RSS Feed is taking longer than usual, which can also result in a MySQL Timeout on your end if it happens to take longer than MySQL is configured to wait for. Link to comment Share on other sites More sharing options...
Aiwa Posted November 20, 2012 Author Share Posted November 20, 2012 Adding further - you mention it's an RSS Feed block, so it could be that the connection to fetch the RSS Feed is taking longer than usual, which can also result in a MySQL Timeout on your end if it happens to take longer than MySQL is configured to wait for. I thought that as well. I have a planned turn off of the RSS feeds in the next couple days. I may have to figure something else out if that is indeed the issue. Link to comment Share on other sites More sharing options...
KevinMc Posted November 21, 2012 Share Posted November 21, 2012 While the aforementioned points are possible reasons you could incur this error, a low memory limit will also cause this. I'm still very curious as to what it's set at. If you haven't messed with it, it's likely set to 128MB, or possibly even lower, at 64MB. You should check it regardless though and set it to at 256MB, as IPB products typically hit the roof around 128MB. Also, one thing to add on that. If you're on a basic shared-hosting plan, you'll likely not be able to have this adjusted. I had to upgrade to VPS in order to set my own memory limit. Link to comment Share on other sites More sharing options...
Aiwa Posted November 21, 2012 Author Share Posted November 21, 2012 While the aforementioned points are possible reasons you could incur this error, a low memory limit will also cause this. I'm still very curious as to what it's set at. If you haven't messed with it, it's likely set to 128MB, or possibly even lower, at 64MB. You should check it regardless though and set it to at 256MB, as IPB products typically hit the roof around 128MB. Also, one thing to add on that. If you're on a basic shared-hosting plan, you'll likely not be able to have this adjusted. I had to upgrade to VPS in order to set my own memory limit. Yes, this board is on a shared host... I'm not entirely convinced that my board is the one causing the problem, more likely someone else is doing something resource intensive and causing my board to lose communication... Memory limit is 128MB... Which is a far cry from the 32MB it had been for about 4 years... The domain owner, not me, also hosts the site and he was a bit lazy in contacting the host to get it raised despite my constant poking at him to do it... I've since bugged him enough about it that he gave me access to the hosting account / support. I'd love to move this board over to a VPS, but it's really not big enough for it and everything is self funded... Don't really have the $$ to spare... $4 / month is easier to handle than $30 / month for an entry level VPS w/ cPanel. What's absolutely awesome here... The host ran a slow query log for 24 hours... About 4 hours before they started the log the board threw the error... In the last 5 days, it hasn't thrown the error once... I haven't changed any configurations on my board yet... I was going to wait for it to throw the error again, then take down the RSS Feed blocks and see what happens from there... Link to comment Share on other sites More sharing options...
KevinMc Posted November 21, 2012 Share Posted November 21, 2012 What do your error logs say? Do you have any hooks or any others scripts that are enabled, but shouldn't be, because they're simply not used? Link to comment Share on other sites More sharing options...
Marcher Technologies Posted November 21, 2012 Share Posted November 21, 2012 hrmm. as a test, open up the rss feed source. Set the timeout of classRss's fileManagement reference to 1(second) This would help specifically if: Adding further - you mention it's an RSS Feed block, so it could be that the connection to fetch the RSS Feed is taking longer than usual, which can also result in a MySQL Timeout on your end if it happens to take longer than MySQL is configured to wait for. Better for the block to return no results than this, though as I said, it would be a test to determine if that is the cause. Link to comment Share on other sites More sharing options...
sound Posted November 22, 2012 Share Posted November 22, 2012 sometimes got this on generic local mysql installs my memory says it was due to the actual size of the content is the whole article/post being called ? if so maybe a look at max_allowed_packet ? setting may help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.