Zeus Gómez Marmolejo writes: > SEND-PR: -*- send-pr -*- > SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as > SEND-PR: will all comments (text enclosed in `<' and `>'). > SEND-PR: > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: MySQL strange error: lost connection during query > > >Description: > When 2 concurrent processes access the database 'sometimes' MySQL > reports this error to both processes at the same time. It happens very > rarely and about 10 seconds later they continue with its normal work. > When we increase the number of processes accessing the database this > happens more often. > Following queries after this error return 'MySQL server has gone > away'. The processes access the database stored at localhost. > It is possible that the tables involved in the queries could get > corrupted after this error. Then, database must be repaired before any > successive inserts in the table. > > >How-To-Repeat: > > void insercion(MYSQL mysql_h1, int orden) > { > int i=1; > > if( mysql_query(&mysql_h1, "insert into conexiones values ('', \ > 'a5sbue123', 'f3089047', 'fassion', '', NULL, 'P', 0)") ) > > do { > printf("%d ERROR %s, n.try %d\n", orden, > mysql_error(&mysql_h1), ++i ); > sleep( rand() % 5 +1 ); > > } while( mysql_query(&mysql_h1, "insert into conexiones values ('', \ > 'a5sbue123', 'f3089047', 'fassion', '', NULL, 'P', 0)") ); > > else > printf("%d Correct!\n", orden); > > } > > This is the possible fix in the user code, retrying some times and > about a random time (in order to avoid another concurrent error). But it > doesn't work. Sometimes reports: 'Database not selected' maybe because > after a bad query the connection to the database has been lost? > I have tested this code in a linux machine with 15 simultaneus > processes and it doesn't happen at all. Could be a problem with the > architecture? >
The errors you are getting are most probably a consequence of the differences between OSF on which MySQL was built and your OSF. See what .err log contains .. -- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php