MySQL Error : Lost connection to MySQL server during query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • profilergirl33
    Member
    • Dec 2004
    • 51
    • 3.0.3

    MySQL Error : Lost connection to MySQL server during query


    Database error in vBulletin 3.5.0:

    Invalid SQL:

    INSERT INTO session
    (sessionhash, userid, host, idhash, lastactivity, location, styleid, languageid, loggedin, inforum, inthread, incalendar, badlocation, useragent, bypass)
    VALUES
    ('ac40edaf859f7d2bdb6377b80d81dbff', 0, '64.242.88.50', '51e6bb8b47f2653c361fc9c2a53ce79a', 1130602579, '/forum/sendmessage.php', 0, 0, 0, 0, 0, 0, 0, 'Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker ([email protected]; http://www.WISEnutbot.com)', 0);

    MySQL Error : Lost connection to MySQL server during query
    Error Number : 2013

    Been getting this error message emailed to my admin address a couple times a day. Please give detailed instructions on how to repair this. (Not as proficient as some members here. )

    TIA
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Please provide the 'wait_timeout' setting from your MySQL variables:

    Admin CP -> Maintenance -> Diagnostics -> System Information -> MySQL Variables

    The default is 8 hours (28800). When this is lowered from the default setting, there seems to be an increase in 'lost connection' errors.

    You can try adding this line to your config.php file right under <?php:

    define('NOSHUTDOWNFUNC', true);
    This may help.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • profilergirl33
      Member
      • Dec 2004
      • 51
      • 3.0.3

      #3
      MySQL Variables Variable_nameValueback_log32basedir/usr/local/mysql/binlog_cache_size32768character_setlatin1character_setslatin1 dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5concurrent_insertONconnect_timeout15datadir/services/databases/mysql/delay_key_writeONdelayed_insert_limit100delayed_insert_timeout300delayed_queue_size1000flu shOFFflush_time0have_bdbNOhave_geminiNOhave_innodbNOhave_isamYEShave_raidNOhave_opensslNOi nit_file interactive_timeout28800join_buffer_size131072key_buffer_size402649088language/usr/local/mysql/share/mysql/english/large_files_supportONlocked_in_memoryOFFlogOFFlog_updateOFFlog_binONlog_slave_updatesOFFlo g_long_queriesONlong_query_time10low_priority_updatesONlower_case_table_names0max_allowed_ packet1048576max_binlog_cache_size4294967295max_binlog_size1073741824max_connections4096ma x_connect_errors65535max_delayed_threads20max_heap_table_size16777216max_join_size42949672 95max_sort_length1024max_user_connections30max_tmp_tables32max_write_lock_count4294967295m yisam_max_extra_sort_file_size256myisam_max_sort_file_size2047myisam_recover_options0myisa m_sort_buffer_size67108864net_buffer_length16384net_read_timeout30net_retry_count10net_wri te_timeout60open_files_limit0pid_file/var/run/sqlc2.pidport3306protocol_version10record_buffer2093056record_rnd_buffer2093056query_buffe r_size0safe_show_databaseOFFserver_id1slave_net_timeout3600skip_lockingONskip_networkingOF Fskip_show_databaseONslow_launch_time2socket/tmp/mysql.socksort_buffer8388600sql_mode0table_cache1024table_typeMYISAMthread_cache_size256th read_stack131072transaction_isolationREAD-COMMITTEDtimezoneUTCtmp_table_size268435456tmpdir/tmp/version3.23.56-logwait_timeout300
      My wait timeout is "300". How do I change this to default ?

      Also where in the config.php file is the <?php supposed to be located ??

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        This is a server setting. You need to have root access to the server and you edit the my.cnf file to change this.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • profilergirl33
          Member
          • Dec 2004
          • 51
          • 3.0.3

          #5
          <?php
          /*======================================================================*\
          || #################################################################### ||
          || # vBulletin 3.5.0 - Licence Number <removed>
          || # ---------------------------------------------------------------- # ||
          || # All PHP code in this file is ©2000-2005 Jelsoft Enterprises Ltd. # ||
          || # This file may not be redistributed in whole or significant part. # ||
          || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
          || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
          || #################################################################### ||
          \*======================================================================*/
          /*-------------------------------------------------------*\
          | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
          +---------------------------------------------------------+
          | If you get any errors while attempting to connect to |
          | MySQL, you will need to email your webhost because we |
          | cannot tell you the correct values for the variables |
          | in this file. |
          \*-------------------------------------------------------*/
          // ****** DATABASE TYPE ******
          // This is the type of the database server on which your vBulletin database will be located.
          // Valid options are mysql and mysqli. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
          $config['Database']['dbtype'] = 'mysql';



          SO RIGHT BEFORE THE LICENSE # INFO ???

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            On a line under:

            <?php

            Note, I have removed your license number. You should not post this publicly.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • profilergirl33
              Member
              • Dec 2004
              • 51
              • 3.0.3

              #7
              Originally posted by Steve Machol
              On a line under:

              <?php

              Note, I have removed your license number. You should not post this publicly.
              Ooops. Thanks Steve for removing that and looking out for us. Was typing quickly and didn't realize. I added the script just under <?php .. hopefully that will work like a charm. I'll be back if I get any more error messages in my mailbox.

              Comment

              • Byron
                Senior Member
                • Nov 2000
                • 525
                • 3.0.0 Beta 6

                #8
                My wait_timeout in admincp says 15

                Is it right?

                Is that value in the admincp in seconds or hours?
                .

                Comment

                • Steve Machol
                  Former Customer Support Manager
                  • Jul 2000
                  • 154488

                  #9
                  That's absurdly low. That's in seconds and the default setting is 28800.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment

                  • Mirrorball
                    Member
                    • Jan 2003
                    • 43
                    • 3.6.x

                    #10
                    My server's wait_timeout setting was 20. I was getting lots of "MySQL has gone away" errors and I convinced the technical support to raise it to 25, but they said they couldn't raise it any further. Does this make sense for a shared hosting account?
                    Ultraviolet - Brazilian U2 forum

                    Comment

                    • Marco van Herwaarden
                      Senior Member
                      • Nov 2004
                      • 6999
                      • 3.8.x

                      #11
                      I doubt you will ever get it running smooth with a setting that low.
                      Want to take your board beyond the standard vBulletin features?
                      Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

                      Comment

                      • Mirrorball
                        Member
                        • Jan 2003
                        • 43
                        • 3.6.x

                        #12
                        But could you please give me any arguments to help me convince them to increase the setting?
                        Ultraviolet - Brazilian U2 forum

                        Comment

                        • Steve Machol
                          Former Customer Support Manager
                          • Jul 2000
                          • 154488

                          #13
                          See post #2. Your host is being unreasonable reducing this from the default of 28000 to just 25.
                          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                          Change CKEditor Colors to Match Style (for 4.1.4 and above)

                          Steve Machol Photography


                          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                          Comment

                          • Mirrorball
                            Member
                            • Jan 2003
                            • 43
                            • 3.6.x

                            #14
                            They said 28000 is not good for shared hosting and I have no idea what bad things could happen to other people's sites if they increased this setting.
                            Ultraviolet - Brazilian U2 forum

                            Comment

                            • Steve Machol
                              Former Customer Support Manager
                              • Jul 2000
                              • 154488

                              #15
                              Then you have our answer. You should get away from this host as fast as you can. They will cause you nothing but problems and your vB will not run on their servers without numerous problems.
                              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                              Change CKEditor Colors to Match Style (for 4.1.4 and above)

                              Steve Machol Photography


                              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...