Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-21-2013, 08:02 AM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MySQL server has gone away?!?!

I've started receiving these emails over the last couple of days. The first email came after I used the auto back up mod manually, ready for a maintenance check. It was stuck in a loop. Then I noticed that when I ran the 'Rebuild Custom Avatar Thumbnails' on the General Update Tools, there was a note at the top saying 'Processing 439 (jpg). Is that the number of avatars I have or does that mean avatar 439 is corrupt? I ask because I have never noticed that before when I have used these toold.

I'm not sure if these two things are related as I am not at all savvy about these things.

This is the email I receive.

Database error in vBulletin 4.2.1:

Invalid SQL:

INSERT INTO cronlog
(varname, dateline, description, type)
VALUES
('cbu_crontask',
1374391680,
'Backup Completed Successfully',
0);

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Sunday, July 21st 2013 @ 08:28:00 AM
Error Date : Sunday, July 21st 2013 @ 08:56:16 AM
Script : http://**sitename***/cron.php?rand=1374391673
Referrer : http://***sitename***/search.php?searchid=167672
IP Address : 81.151.101.195
Username : Unregistered
Classname : vB_Database
MySQL Version :

The number below '('cbu_crontask', is always different except for the beginning 13743*****. Is my db corrupted and if so, how can I fix it,

Is it that avatar 439? If so how do I find an individual image. The avatar stats ay we don't have any Custom Avatars. I mention this as I've never noticed that before, although it could be that I'm a little more aware because I'm now actually looking for things.

Thanks in advance.
Reply With Quote
  #2  
Old 07-22-2013, 11:17 AM
betterthanyours betterthanyours is offline
 
Join Date: May 2012
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Increase the wait_timeout to a higher value (if you have access to the .conf file)
Reply With Quote
Благодарность от:
dlewisr
  #3  
Old 07-22-2013, 05:50 PM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that info. I'm not sure if it is a time out, even though I say it's on a loop, as this happens within 15 secs and has never happened before. In saying that, your suggestion is a good idea. I take it that is the words that I look for in the config file 'wait_timeout. I'll try that now.

Thanks again.

--------------- Added [DATE]1374519234[/DATE] at [TIME]1374519234[/TIME] ---------------

I've looked at the config file and the only line I find with 'timeout' is this

$config['Misc']['memcachetimeout'][$i] = 1;

Then checking your post again I see that you have put .conf file. I take it I'm looking at the wrong file? Where would I find the file you mention?
Reply With Quote
  #4  
Old 07-22-2013, 08:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As already noted, it's a wait_timeout issue. I get the same on my server when I do backups because they are large and by the time the backup is finished and then the script wants to write to the cronlog table to say it did the task, the wait_timeout is over and done with and you get MySQL Server has Gone Away.

If you are getting that error because of other things on the site also, they I would worry about it. If it's just this daily backup script, I would remove the line in the script that logs the action and then the errors will stop.
Reply With Quote
Благодарность от:
dlewisr
  #5  
Old 07-22-2013, 09:58 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its a MySQL server thing, not a vBulletin setting.
Reply With Quote
Благодарность от:
dlewisr
  #6  
Old 07-31-2013, 01:16 PM
dlewisr dlewisr is offline
 
Join Date: Mar 2011
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your responses Lynn and Zachery. No surprise that it was something that I had caused myself. I had changed the settings of the auto back up and set the button for 'Block Processing' to no. As you already mentioned, this created the time out issue.

Thanks again.
Reply With Quote
  #7  
Old 10-15-2013, 04:01 AM
mad4social mad4social is offline
 
Join Date: Dec 2012
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyone that knows the exact command for edit php.ini by root?
Reply With Quote
  #8  
Old 10-15-2013, 12:16 PM
nxtgen nxtgen is offline
 
Join Date: Sep 2013
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sudo nano php.ini

I have the same issue when I try to access my blogs. As soon as you attempt to open a blog, the site times out and i receive a similar message via email
Reply With Quote
  #9  
Old 10-15-2013, 10:27 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its not a php thing, but you should really not hijack others topics.
Reply With Quote
  #10  
Old 10-15-2013, 11:46 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.mysql.com/doc/G/o/Gone_away.html
http://www.mysql.com/doc/C/o/Common_errors.html
http://www.mysql.com/doc/S/e/Server_parameters.html
http://www.mysql.com/doc/O/p/Option_files.html
http://www.mysql.com/doc/S/H/SHOW_VARIABLES.html

The most common reason for the MySQL server has gone away error

1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.

2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.

i.e. to check mysql uptime, in shell as root user type:

mysqladmin -u root -p version

3. You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M) or via max_allowed_packet variable in your /etc/my.cnf file and restarting mysql after you edited your /etc/my.cnf file. The extra memory is allocated on demand, so mysqld will use more memory only when you issue a big query or when mysqld must return a big result row

4. or simply your host restarted mysql.. i'd contact your web host
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04273 seconds
  • Memory Usage 2,267KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete