This is a migrated thread and some comments may be shown as answers.

LockNotGranted Exception

1 Answer 144 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas
Top achievements
Rank 1
Thomas asked on 25 Jan 2010, 03:06 PM

I am getting reports from users of our software which all state the following error:

 

Telerik.OpenAccess.Exceptions.LockNotGrantedException: Insert of '~~~~' failed:  
Telerik.OpenAccess.RT.sql.SQLException:  
Das Timeout für Sperranforderung wurde überschritten. 

We use the default timeout for locks which is 5 seconds.

This is my question: Does OpenAccess lock tables for reading access? If so, can I modify this behavior?

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 26 Jan 2010, 08:45 AM
Hi Thomas,
If you do not use pessimistic concurrency control the locks should only occur during commit. If you have some bigger commits that uses more than 5 seconds, can also happen because the server has some load, you might see lock timeouts.
There are two other situations where a row might be locked, one is transaction.flush(), this flushes all changes to the server and keep the server txn open (similar to IgnoreUncommitted = false setting at the query).  The other situation is a GetObjectId() call on a new object with autoinc key generator setting. Here we also flush the insert statement which might result in blocking insert statements form other scopes.

Sincerely yours,
Jan Blessenohl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Databases and Data Types
Asked by
Thomas
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Share this question
or