Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

10.2 UAP error recovery

When an error occurs in a UAP, measures must be taken to prevent the entire HiRDB system from halting. This section explains the following three methods of recovering from UAP errors:

Table 10-4 shows the UAP error types and the recovery methods.

Table 10-4 UAP error types and recovery methods

Error type Detection method System action Recovery method
UAP abnormal termination UAP processing time Monitoring Disconnects the UAP process UAP transaction rollback
UAP endless loop
Transaction incomplete
UAP processing error Various error detection at the servers1 Sends error response to UAP Transaction rollback by UAP instruction
Error detection and rollback request by UAP Error detection by UAP Follows an instruction from UAP
Deadlock HiRDB deadlock detection Sends error response to UAP (implicit rollback) Termination of UAP transaction
Memory shortage Error during memory allocation Disables UAP activation Reevaluate shared memory and process-specific memory2

1 Front-end or back-end server.

2 Request that the HiRDB system administrator re-evaluate shared memory and process-specific memory.

Organization of this section
(1) Monitoring UAP processing time
(2) Detecting errors at servers
(3) Detecting UAP errors
(4) Re-evaluating memory capacity

(1) Monitoring UAP processing time

When a UAP is executed, HiRDB's UAP monitors the processing time to prevent a UAP error from halting the HiRDB processing for an extended period of time.

For time monitoring, a monitoring time must be specified in the PDSWAITTIME environment variable during client environment definition; if omitted, the UAP monitors by HiRDB's default monitoring time.

For details about client environment definition, see 6.6 Client environment definitions (setting environment variables).

(2) Detecting errors at servers

A HiRDB/Parallel Server returns an error status to the UAP when an error, such as a database processing error, is detected at the front-end server or back-end server while executing SQL statements; steps such as process disconnection must be taken. When a UAP issues a rollback request in response to an error status, HiRDB performs a recovery process.

(3) Detecting UAP errors

When an error is detected in a UAP, a recovery process is started when a rollback request is issued. If the UAP was processed normally, the process is disconnected based on a disconnection instruction from the UAP.

(4) Re-evaluating memory capacity

When a shortage occurs in the shared memory or process-specific memory, a message is output indicating the memory or disk space shortage. When such a message is output, enough memory to activate the UAP must be allocated and the UAP must be re-executed.

For details about how to check and, if necessary, revise shared memory and process-specific memory, see the HiRDB Version 8 Installation and Design Guide or contact the HiRDB system administrator.