Re: Error -121 (cannot write log record) on update in Informix SE 5.01 in a Transaction
Posted in 1996
TA TUAN wrote: > > Informix SE 5.01 seems to have a problem with some kind of > transaction. > As reading a table, we update each rows of the same table, one row at > a time. If we commit after each update, no problem. In the case of a > global transaction (commit after the last updated row), we got the > error 346 followed by Isam error 121. The number of rows updated is > about 300 and enough space is available for Informix Logs. > > If you are award about known problems, thanks to you to help us. > Implicit software Corporation If I remember my Standard Engine correctly this could be caused by a shortage of Unix file locks. When we write to the log file we need to lock our space so that no one else writes over our spot. We also need to lock the .idx (and possibly the .dat) we takes more kernal locks as well. Now unix will merge locks on files together if they are contiguous bytes and being locked by the same user, but if they aren't next to each other or the same person then they require multiple unix locks. For example if user A locks byte 1 of a file and then user B locks byte 2 and then user A locks byte 3, you must have 3 kernal file locks. Also the above example you removed user B since user A is locking bytes 1 and 3 it will require 2 locks. Lastly, if user A locks byte 1, he has 1 kernal lock. He then locks byte 2, the kernal should know that 1 and 2 are next to each other and being locked by the same person so it will expand the lock that user A already has and still only require 1 lock. So my guess is that when you update the 300 rows you've exhausted your kernal file locks available on the system or possibly per user. So try to increase those resources or lock the table exclusive. I belive the kernal parameter would be NLOCK or NFLOCK. -- ******************************************************************** * Jacques P. Renaut "I'd dazzle you with brilliance * * Informix Advanced Support if I only had the knack..." * * email: jrenaut@informix.com #include <disclamier.h> * ********************************************************************