in reply to fetchrow_array loop in perl 5.10
Potentially, this is result of DB upgrade. For example SQLite databases have changed the way how they manipulate locks on files. Depending on which table is read and which table is updated you may get different locking problems. One can play with BEGIN TRANSACTION or autocommit settings to avoid dead-locking.
Anyway, most likely you should provide information about DB that is being used and SQL statements that are executed.