Re: "Cannot write log record..." :((((((((
Posted in 1995
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation, Platform-Specific Issues
tonytd@ttyrwhit.demon.co.uk (Tony Tyrwhitt-Drake) wrote:
>In article <DBLr5D.LJD@cix.compulink.co.uk>, tbone@cix.compulink.co.uk ("Chris Totten") says:
>>
>>
>>> Date: 12/07/1995 Time: 10:23:36
>>> Program error at "custom.4gl", line number 225.
>>> SQL statement error number -346.
>>> Could not update a row in the table.
>>> SYSTEM error number -121.
>>> ISAM error: cannot write log record>>
>>I'm getting this error message whenever I try to carry out the following
>>(simple) SQL update command. The command is part of a 4GL program, but it
>>falls over even I try to do the update from ISQL... :(
>>
>>update stamtana ",
>> set area_code = "C2"
>> where cust_no = "XXXX"
>>
>
>It may be that for the value of "XXXX" and given that you have many
>rows in the table, that you are creating too large a transaction.
>Try locking the whole table first ( lock table stamtana in exclusive
>mode), then run the update.
>
>If this doesn't work, how about dropping the indexes and trying
>the update with no indexes.
If this is the same problem we have often encountered with SE (versions
2, 4 and 5), and I think that it is, then the idea that it is caused by "too
large a transaction" is correct. The engine is running out of record locks.
SE on the systems we support uses the flock() system call for record locks.
On SCO system the number is limited, but can be increased by remaking
the kernel after changing the size of the FLOCK parameter. Of course, the
solution proposed above (locking the table) will also work as this obviates
the need to lock each record in the transaction. On AIX systems we have
not had this problem as the size of these internal structures is dynamically
managed by the kernel (with VERY high upper limits).
We normally increase the number of flocks on a SCO system to 3000 or so,
because the system memory required is reasonably small (14 bytes per flock,
if my memory serves me correctly). We also try to sell AIX machines rather
than SCO machines.
Hope this helps :)
Richard Maurice
rmm@southern.co.nz