473,770 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

deadlock or timeout (very urgent)

1 New Member
Hi All,

I am a newbie to db2 database. Currently i am facing an issue which i know for sure that many would have faced and resolved.

I am running 6 sql scripts concurrently against the db

the db server is db2/6000 8.2.3

The log file shows couple of errors with the same msg ,

Expand|Select|Wrap|Line Numbers
  1. DROP TABLE  testing123
  2. DB21034E  The command was processed as an SQL statement because it was not a  valid Command Line Processor command.  During SQL processing it returned:
  3. SQL0911N  The current transaction has been rolled back because of a deadlock or timeout.  Reason code "68".  SQLSTATE=40001
No one is using this table when i try to drop this table.

But after sometime when i run the same command , the script executes successfully. The same error appears on all the 6 log files.

I also tried running one sql at a time and found that i did not encounter the timeout error .

I guess this should be due to the timeout parameter set at the database level.
But i am not sure which parameter to tweak .

some of the parameters that was found on the net were locktimeout , maxlocks etc

Expand|Select|Wrap|Line Numbers
  1. Max storage for lock list (4KB)              (LOCKLIST) = 25000
  2. Interval for checking deadlock (ms)         (DLCHKTIME) = 10000
  3. Percent. of lock lists per application       (MAXLOCKS) = 80
  4. Lock timeout (sec)                        (LOCKTIMEOUT) = 180
i am also trying to get the snapshot of the database.

Please help me resolve this issue .

Any help on this regard highly appreciated .

-K
Dec 3 '07 #1
1 4304
docdiesel
297 Recognized Expert Contributor
Hi,

try a
Expand|Select|Wrap|Line Numbers
  1. set lock mode to wait 5
in your sql scripts to set their timeout to 5 seconds. Perhaps then they give you a hint what's wrong.

Regards,

Bernd
Dec 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
6432
by: Anita | last post by:
Hi All, Can multiple updates on one table using single query generate deadlock ? For example, at the same time, there are 2 users run 2 queries as follows : User1 runs : update tab1 set tab1.v = tab1.v + 1 from tab1 inner join tab2 on tab1.no = tab2.no
7
9227
by: Andrew Mayo | last post by:
Here's a really weird one for any SQL Server gurus out there... We have observed (SQL Server 2000) scenarios where a stored procedure which (a) begins a transaction (b) inserts some rows into a table (c) re-queries another table using a subquery which references the inserted table (correlated or not)
8
9551
by: Javauser | last post by:
Hi there we are getting the following db2 error on executeBatch() method that inserts n rows on a table (where n is between 50 and 200). SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "2". SQLSTATE=40001 errorCode : 911
11
14077
by: EoRaptor | last post by:
I`m exporting data from many Lotus Notes databases to a DB2 database using LotusScript. The LotusScript agents commit after EACH update/insert. Nevertheless, I keep getting transaction rollbacks on deadlock or timeout. When I get a snapshot for locks, I see that one of the export agents is getting a table lock rather than a row lock. I`m guessing this is what causes the time out. Questions: how do I determine whether it`s a deadlock or a...
8
2318
by: mk | last post by:
You probably suspect the answer, typically its 'yes' deadlock can occur in any multithreaded application. Even ones that employ static members. Commonly it occurs when more than one thread tries to lock a resource that another thread has already locked. A workaround is to use the Monitor object's TryEnter method, and pass a timeout value, if timeout occurs the method returns false. This pattern will save you no end of pain and...
3
4025
by: J.Marsch | last post by:
Issue: I have 3 threads, syncing with a ReaderWriterLock (in "real life", there will be more). Thread 1 (there could be any number of these) Gets a read lock with infinite timeout. It runs in a loop. The readlocks are requested and released very often. Thread 2 (only one, this is my deadlock testing thread) represents a longer running process. It gets a ReadLock as well.
2
8968
by: Sumanth | last post by:
Hi , I am trying to acquire a lock on a table A in exclusive mode, and this statement gives an error indicating a deadlock or timeout has been detected. The lock timeout value is set to 0 which I understand is to wait for however long it takes to acquire a lock. Also there are other processes that have acquired row level exclusive locks on the table A when this error happened.Is DB2 throwing this error as a pre-emptive measure.
0
11702
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting transaction"; We get such errors generally on inserts or updates while applying a
2
4703
by: | last post by:
I have a db2 V. 8.1 Fix Pack 13 installed, and i have too much problem with deadlock, maibe depends becouse i have a direct remote connection with a 56k modem. Someone know if depends to a particular parameter?
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.