![]() |
Getting Locking Information
|
|
Lock MonitoringThe cloudscape.stream.error.logSeverityLevel property determines the level of error you are informed about. By default, cloudscape.stream.error.logSeverityLevel is set at 40000. If cloudscape.stream.error.logSeverityLevel is set to display transaction-level errors (that is, if it is set to a value less than 40000), deadlock errors are logged to the cloudscape.LOG file. If it is set to a value of 40000 or higher, deadlock errors are not logged to the cloudscape.LOG file. The cloudscape.locks.monitor property ensures that deadlock errors are logged regardless of the value of cloudscape.stream.error.logSeverityLevel. When cloudscape.locks.monitor is set to true, all locks involved in deadlocks are written to cloudscape.LOG along with a unique number identifying the lock. To see a thread's stack trace when a lock is requested, set cloudscape.locks.deadlockTrace to true. This property is ignored if cloudscape.locks.monitor is set to false. NOTE: Use cloudscape.locks.deadlockTrace with care. Setting this property may alter the timing of the application, severely affect performance, and produce a very large cloudscape.LOG file. For information on how to set properties, see Tuning Cloudscape. For specific information about the properties mentioned in this section, see the properties chapter in that book. Here is an example of a victim's error message when Cloudscape aborts a transaction because of a deadlock: --SQLException Caught-- SQLState: 40001 Error Code: 30000 Message: A lock could not be obtained due to a deadlock, cycle of locks & waiters is: Lock : ROW, X, FLIGHTAVAILABILITY, (1,6) Victim XID : 938, APP, UPDATE FlightAvailability SET economy_seats_taken = 0 WHERE flight_id = 'AA1116' Granted XID : 939 Lock : ROW, X, HOTELAVAILABILITY, (1,6) Waiting XID : 939, APP, UPDATE HotelAvailability SET rooms_taken = 0 WHERE hotel_id = 9 Granted XID : 938 NOTE: You can use the cloudscape.locks.waitTimeout and cloudscape.locks.deadlockTimeout properties to configure how long Cloudscape waits for a lock to be released, or when to begin deadlock checking. For more information on these properties, see the chapter in the Cloudscape Developer's Guide that discusses controlling Cloudscape application behavior. |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |