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? >Fix: Unknown fix >Submitter-Id: Zeus Gomez Marmolejo >Originator: >Organization: Facultat d'Informatica de Barcelona [UPC] <organization of PR author (multiple lines)> >MySQL support: none >Synopsis: MySQL error report >Severity: serious >Priority: medium >Category: mysql >Class: sw-bug >Release: mysql-3.23.38 (Official MySQL binary) >Environment: <machine, os, target, libraries (multiple lines)> System: OSF1 merlin.fib.upc.es V5.1 732 alpha Machine: alpha Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/local/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf4.0e/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) Compilation info: CC='cc -pthread' CFLAGS='-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all' CXX='cxx -pthread' CXXFLAGS='-O4 -ansi_alias -fast -inline speed -speculate all -noexceptions -nortti' LDFLAGS='' LIBC: lrwxrwxrwx 1 root system 17 Jun 14 13:04 /lib/libc.a -> ../ccs/lib/libc.a lrwxrwxrwx 1 root system 17 Jun 14 13:04 /usr/lib/libc.a -> ../ccs/lib/libc.a Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --with-prefix=/usr/local/mysql --with-mysqld-ldflags=-all-static --disable-shared '--with-named-thread-libs=-lpthread -lmach -lexc -lc' --disable-shared Perl: This is perl, version 5.005_03 built for alpha-dec_osf --------------------------------------------------------------------- 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