PURPOSE:
This document explains how to detect deadlock or blocked thread in SUP CDB.
REQUIREMENT:
- SUP 2.x
SOLUTION:
In order to figure out if the system is in a deadlock situation, we need to do the following:
- Go to SUP default installation path (ie. C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN32 )
- Invoke dbisql.exe
- User ID: dba
- Password: sql ( i.e Note: sql is the default )
- Make sure you fill the login screen as follows:
- After connecting, issue the following Query:
SELECT PROPERTY('ActiveReq') - It returns the number of server threads that are currently handling the requests. See below
- If the number is the max value of -gn, it means you are running out of worker threads at the database level.
- Next execute this query:
SELECT PROPERTY('UnschReq') - If you see the result is zero as shown below that means, you are not running out of threads and you are not experiencing thread's deadlock:
- If the result was a none zero value, that means, you have worker threads are waiting. In that case, if the result is a large number, you may need to update the -gn switch for the default CDB database.
- To get more details about the -gn switch and how to modify it, please refer to the following address; http://dcx.sybase.com/index.html#sup0212/en/com.sybase.infocenter.dc01205.0212/doc/html/aba1316012479255.html
SUMMARY:
In order to determine if you have threads are waiting or if the -gn switch needs to be adjusted, monitor your system by using the "UnschReq" and "ActiveReq" requests.