Professional Web Applications Themes

[PHP] Lost Connection to MySQL server during query - PHP Development

Are you using mysql_pconnect or just mysql_connect? Donald Tyler wrote: > I have a script that is processing data from a single table and splitting it > into smaller normalized tables. > > > > The script takes anywhere between 5-10 minutes to complete, and as it runs > it constantly outputs a report on its progress. > > > > The script seems to run fine the first time I run it, but with subsequent > runs (To see if it incorrectly creates duplicates of records etc), after a > couple of minutes the script ends with an error ...

  1. #1

    Default Re: [PHP] Lost Connection to MySQL server during query

    Are you using mysql_pconnect or just mysql_connect?

    Donald Tyler wrote:
    > I have a script that is processing data from a single table and splitting it
    > into smaller normalized tables.
    >
    >
    >
    > The script takes anywhere between 5-10 minutes to complete, and as it runs
    > it constantly outputs a report on its progress.
    >
    >
    >
    > The script seems to run fine the first time I run it, but with subsequent
    > runs (To see if it incorrectly creates duplicates of records etc), after a
    > couple of minutes the script ends with an error message saying "Lost
    > connection to MySQL server during query".
    >
    >
    >
    > During the first run, the script is mostly just chopping up the data and
    > placing it in the new tables, and doing a little comparing. But during
    > subsequent runs, all of the records in the new tables should already exist,
    > so the script see's this, and instead of creating new records, it compares
    > them to see if its correct.
    >
    >
    >
    > Does anyone have any idea why it would be losing connection all the time?
    >
    >
    >
    > This is just being run on a test server at the moment. Being used as the
    > server and also the client, configured as follows:
    >
    >
    >
    > Windows XP Tablet Edition
    >
    > PHP 4.3.3
    >
    > PHP Extensions: XmlRPC
    >
    > MySQL 4.0.14
    >
    > Apache 2.0.47
    >
    >
    >
    > Please help, this has been making my life hell for a week now!
    >
    >
    >
    > Thanks
    >
    >
    >
    >
    >
    > Donald
    >
    >
    Marek Kilimajer Guest

  2. #2

    Default Re: [PHP] Lost Connection to MySQL server during query

    * Thus wrote Donald Tyler (chekote69hotmail.com):
    >
    > The script seems to run fine the first time I run it, but with subsequent
    > runs (To see if it incorrectly creates duplicates of records etc), after a
    > couple of minutes the script ends with an error message saying "Lost
    > connection to MySQL server during query".
    This is a good sign that mysql is crashing for some reason, check
    your mysql logs and seek the mysql archives.

    Curt
    --
    "I used to think I was indecisive, but now I'm not so sure."
    Curt Zirzow Guest

Similar Threads

  1. Replies: 5
    Last Post: September 12th, 10:46 PM
  2. Replies: 26
    Last Post: September 12th, 11:02 PM
  3. #26490 [Com]: Lost connection to MySQL server during query
    By claudelfino at hotmail dot com in forum PHP Bugs
    Replies: 1
    Last Post: December 15th, 03:46 PM
  4. Lost connection to MySQL server during query
    By Donald Tyler in forum MySQL
    Replies: 1
    Last Post: April 10th, 06:04 PM
  5. Replies: 15
    Last Post: February 26th, 11:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139