From: <sinisa Date: January 21 2000 12:43pm Subject: Re: Error:While trying to read and write into one table at the same time List-Archive: http://lists.mysql.com/mysql/24927 Message-Id: <14472.21616.245462.805105@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lars Dittmann writes: > Hi everybody, > > We are using the following components: > MySQL v 3.21.29-gamma and > mm.mysql.jdbc-1.2a (or maybe mm.mysql.jdbc-1.2b) > > Two days ago we have encountered a problem with our Java Clients, who > write and read in our database at the same time. > Once in a while this error code occurred: > SQLException: Error during query: Unexpected Exception: > java.sql.SQLException message given: General error: Can't lock file > (errno: 11) > SQLState: S1000 > VendorError: 0 > > We could not explain the problem exactly, but now we have isolated it by > the following test: > > We have created to Java Clients: > Test_read: Reads permanently from table1 > Test_write: Writes permanently new records into table1 > > We ran the clients simultaneously in different combinations: > Running two or more Test_read Clients at the same was no problem > Running two or more Test_write Clients at the same was no problem > Running one Test_read and one Test_write Client at the same time was no > problem for the Test_read Client, but the Test_write throuw the > exception mentioned above. > > In Test_read we are using ReadOnly-Connections, that did not solve the > problem. > > Question: How can we solve the problem? > Restriction: We need to access the database without coordination, so > writing a Scheduler won't help > Idea: For all Insert-Statements we could write a function, that checks, > if the returned error is 11. If this is the case the functions waits > like 5 sec. and tries to Insert again. But we do not think this is very > nice. > > Thanks for you help, > Andre & Lars > Hi! First of all, please upgrade to the latest stable release. It is hard to provide support for ancient versions. But your problem is quite typical. You have run out of system resources. You should increase maximum number of file descriptors, and if that does not help, you should increase max number of processes. How to do it. It depends on your OS and it's version. If it is Unix, then kernel version. Regards, Sinisa +----------------------------------------------------------------------+ | TcX ____ __ _____ _____ ___ == mysql@stripped | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +----------------------------------------------------------------------+