Errors on 4GL application logs
Posted in 2009
A 4GL 4.12 app on Informix 7.13 (HP-UX) was failing inserts with SQL -271 / ISAM -154 "Lock Timeout Expired". Replies explained this means the program set LOCK MODE TO WAIT <n> seconds and another session held a page/index lock longer than that; suggestions were to switch the table from page-level to row-level locking, avoid wrapping plain SELECTs in BEGIN WORK, and choose a suitable isolation level. The poster confirmed that ALTERing the table to row locking fixed it, though Art Kagel warned to also review apps that hold locks too long (e.g. interactive FOR UPDATE screens) and consider optimistic locking.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
Can anyone provide me some clue on these logs below? How to start
troubleshoot?
We are using 4GL ver 4.12 with informix 7.13 running on hp-unix 10.01?
4GL application logs below. No errors on informix database logs.
SQL statement error number -271.
Could not insert new row into the table.
SYSTEM error number -154.
ISAM error: Lock Timeout Expired
Add at the beginning of the program : set lock mode to wait 10 (for 10 seconds
or whatever you need)
HTH, Cheers
Olmedo Monteverde
-----Message d'origine-----
De : ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] De la part de DEEPAK
JOSHI
Envoyé : mardi, 13. octobre 2009 16:01
À : ids@iiug.org
Objet : Errors on 4GL application logs [17504]
Can anyone provide me some clue on these logs below? How to start
troubleshoot?
We are using 4GL ver 4.12 with informix 7.13 running on hp-unix 10.01?
4GL application logs below. No errors on informix database logs.
SQL statement error number -271.
Could not insert new row into the table.
SYSTEM error number -154.
ISAM error: Lock Timeout Expired
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Your 4GL code is setting LOCK MODE TO WAIT <nseconds> and some other process
is holding a lock on a data page or index node for longer than nseconds. If
the table's locking mode is (PAGE) change it to (ROW), that will help reduce
the number of lock clashes. Otherwise you need to find the offending
application and modify it so that it does not hold locks for more than a
second or two.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Tue, Oct 13, 2009 at 10:01 AM, DEEPAK JOSHI <djoshih@hotmail.com> wrote:
> Can anyone provide me some clue on these logs below? How to start
> troubleshoot?
>
> We are using 4GL ver 4.12 with informix 7.13 running on hp-unix 10.01?
>
> 4GL application logs below. No errors on informix database logs.
>
> SQL statement error number -271.
> Could not insert new row into the table.
> SYSTEM error number -154.
> ISAM error: Lock Timeout Expired>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001517503d749bab350475d4d0e2
Aunque no le puedo contestar en ingles, si le puedo guiar para resolver este
problema, tambien lo tuve, como lo resolvi.
Colocar un nivel de ISOLATION.
Como este error se presenta es cuando trato de utilizar tablas que tengo
bajo un begin work, tener en cuenta el begin work que solo opere cuando
hago operaciones sobre las tablas como insert, delete, update.
Una mala practica colocar el begin work, cuando selecciono parametros o hago
un select.
Espero hacerme entender.
Hugo R.
2009/10/13 DEEPAK JOSHI <djoshih@hotmail.com>
> Can anyone provide me some clue on these logs below? How to start
> troubleshoot?
>
> We are using 4GL ver 4.12 with informix 7.13 running on hp-unix 10.01?
>
> 4GL application logs below. No errors on informix database logs.
>
> SQL statement error number -271.
> Could not insert new row into the table.
> SYSTEM error number -154.
> ISAM error: Lock Timeout Expired>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636ed66375de1790475db0164
Hugo says that he's seen this problem when he has used BEGIN WORK starting a
transaction when the only statements are SELECTs. He says that avoiding
doing that resolved the locking problem for him. He also suggests being
careful to select an appropriate ISOLATION level
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Tue, Oct 13, 2009 at 9:23 PM, Hugo Rodriguez <hdrodriguezr@gmail.com>wrote:
> Aunque no le puedo contestar en ingles, si le puedo guiar para resolver
> este
> problema, tambien lo tuve, como lo resolvi.
>
> Colocar un nivel de ISOLATION.
> Como este error se presenta es cuando trato de utilizar tablas que tengo
> bajo un begin work, tener en cuenta el begin work que solo opere cuando
> hago operaciones sobre las tablas como insert, delete, update.
>
> Una mala practica colocar el begin work, cuando selecciono parametros o
> hago
> un select.
>
> Espero hacerme entender.
>
> Hugo R.
>
> 2009/10/13 DEEPAK JOSHI <djoshih@hotmail.com>
>
> > Can anyone provide me some clue on these logs below? How to start
> > troubleshoot?
> >
> > We are using 4GL ver 4.12 with informix 7.13 running on hp-unix 10.01?
> >
> > 4GL application logs below. No errors on informix database logs.
> >
> > SQL statement error number -271.
> > Could not insert new row into the table.
> > SYSTEM error number -154.
> > ISAM error: Lock Timeout Expired> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001636ed66375de1790475db0164
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001517503d7416a40c0475e3fc2c
We changed the table locking mode to row and it works. Thx again for your advice.
Note that you should still take a look at your applications. It is likely that they are holding locks longer than they should. For example if an interactive app retrieves a row within a transaction FOR UPDATE (which will lock it) then presents it on a form for the user to modify and either commits or rollsback the transaction once the user is finished modifying it, that could cause you trouble if the user takes a phone call, goes to the wash room, or to lunch or home before committing. Such interactive applications should be using optimistic locking protocols instead. Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Oct 15, 2009 at 8:14 AM, DEEPAK JOSHI <djoshih@hotmail.com> wrote: > We changed the table locking mode to row and it works. > > Thx again for your advice. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --000e0ce0091e0836960475f8f5d2
Related threads
- RE: transfer via comp.databases.informix
- dbimport hangs
- Assert Failed errno 271 ISAM ERR -12803
- Syslocks table