Announcement

Collapse
No announcement yet.

Database lost connection to source

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database lost connection to source

    • Type of import (clean).
    • Eve/groupee version 1.2.16
    • vBulletin 3.6.4
    • Module issue occurred on 009 posts
    • MySQL Error : Lost connection to MySQL server during queryError Number : 2013
    Hi This happened after around 90k posts and now I cant even get the impex index page to load. Just keeps trying. What would you suggest next? I guess try it again but how do I get the impex index to show again?

    Thanks for any and all help.

    Richard

  • #2
    The most common reasons for the MySQL server has gone away error are:

    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 and ask him to look into this.

    Links to additional information:
    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
    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


    • #3
      Well I talked to my host and they looked at it said they couldnt find anything wrong with the settings on their end.

      They suggested only doing 100 posts at a time. With 134,000 posts that will take forever.

      So last night I could do 2000 posts per cycle and it didnt stop till it reach about 90k posts. Today it wont do 2000 posts it stops right away.

      So I am confused and a little frustrated at this point. I have tried to use the feature to clean out the imported data and start all over and it goes fine till I hit the posts. (sighs)

      Any other ideas?

      Richard

      Comment


      • #4
        This may be a server time and/or memory limit. To temporarily up your limits edit your includes/config.php file and add these lines right under the <?php line:

        ini_set('memory_limit', 32 * 1024 * 1024);
        ini_set("max_execution_time", "600");
        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


        • #5
          Okay Steve, tried that and then it lost connection at about 40k posts. I checked the log and found that the wait timeout setting is at 180. Is that part of the problem? I saw that on a couple of other threads. If I ask them to boost it up how much does it have to go before this might work?

          Thanks again for your help


          Richard

          Comment


          • #6
            Since the default MySQL wait_timeout is 28800, I would say that could definitely be the problem. I would ask them to set this to the default.
            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


            • #7
              Well the bad news is ...........my host will not up the wait time any higher on the server because its a shared plan. They offered to do the import but that won't work. I have to be able to do it myself and clean it up then take down my other board.

              So any ideas about what I can do?


              Thanks

              Richard

              Comment


              • #8
                If your host won't cooperate then I don't know what you can do. Sorry.
                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


                • #9
                  Originally posted by SOL_R View Post
                  So any ideas about what I can do?

                  Do you have access to another machine to do the import ? Even your desktop if that's windows based you could do the import there.

                  xampp for instance is very easy to install and all you need is ImpEx and the source database, then the vBulletin database, you don't need a full install.
                  I wrote ImpEx.

                  Blog | Me

                  Comment


                  • #10
                    Hi Jerry thanks! So do you have some instructions on how to do this locally?

                    Thanks for your help!

                    I downloaded xampp.


                    Richard

                    Comment


                    • #11
                      Install xmapp, then you will have MySQL apache and PHP all set up for you.

                      1) You then need to get a copy of your source database and restore that to the MySQL server on your desktop.

                      2) Get a copy of your vBulletin database and restore that to your desktops MySQL server as above.

                      3) Download ImpEx and put it in the xmapps httpdocs/ folder.

                      4) Edit ImpExConfig.php

                      5) Browse to ImpEx on localhost.
                      I wrote ImpEx.

                      Blog | Me

                      Comment


                      • #12
                        Jerry, I have a copy of both databases but when I try to import them I am getting an error message that they are to big. I was thinking about trying bigdump or ? Not sure how to work this on a desktop really. Sorry


                        You make it sound so easy lol, any guidance is great.


                        Thanks

                        Richard

                        Comment


                        • #13
                          Copy the files to where ever the MySQL bin directory is, by default I believe its :

                          C:\Program Files\xampp\mysql\bin

                          Use phpMyAdmin (xampp comes with phpMyAdmin) and create two databases :

                          http://localhost/phpmyadmin/

                          source and target.

                          Open up a DOS prompt and cd to C:\Program Files\xampp\mysql\bin.

                          Then load the files using the command line via the DOS window (much better for big files that phpMyAdmin) :

                          mysql source < source.sql
                          mysql target < target.sql

                          depending on what your source.sql and target.sql file names actually are.
                          I wrote ImpEx.

                          Blog | Me

                          Comment


                          • #14
                            Hi Jerry! That worked great! Thank you so much.

                            I put the impex folder into the htdocs folder and then I have the config file as such

                            # For mysqli enter mysql
                            $impexconfig['target']['databasetype'] = 'mysql';
                            $impexconfig['target']['server'] = 'localhost';
                            $impexconfig['target']['user'] = 'root';
                            $impexconfig['target']['password'] = 'XXXXX';
                            $impexconfig['target']['database'] = 'smartb';
                            $impexconfig['target']['tableprefix'] = 'vb_';


                            # If the system that is being imported from uses a database,
                            # enter the details for it here and set 'sourceexists' to true.
                            # If the source data is NOT stored in a database, set 'sourceexists' to false

                            $impexconfig['sourceexists'] = true;

                            # mysql / mssql
                            $impexconfig['source']['databasetype'] = 'mysql';
                            $impexconfig['source']['server'] = 'localhost';
                            $impexconfig['source']['user'] = 'XXXX';
                            $impexconfig['source']['password'] = 'XXXXXX';
                            $impexconfig['source']['database'] = 'Infopop';
                            $impexconfig['source']['tableprefix'] = '';

                            It seems to be finding the target but the source is coming up with it cant find or connect to it.

                            Am I missing something here? Do I need to edit anything else besides the config?

                            Thanks again!~

                            Richard

                            Comment


                            • #15
                              Try using the root user and password for the source as well, then permissions arn't going to be an issue.

                              Can you see both databases : smartb and Infopop when browsing phpMyAdmin ?
                              I wrote ImpEx.

                              Blog | Me

                              Comment

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