The options in this section indicate the resource to be constrained and the maximum amount of the resource that can be consumed by a given connection.
You must set the RMON parameter in the [CONFIG] section
to have the options in the [LIMIT_RESOURCE] section
take effect.
[LIMIT_RESOURCE:ACTION=[{KILL|CANCEL}][BUSY=value] attribute: regex [, regex] [attribute: regex [, regex]]
ACTION {KILL | CANCEL}– select the action to be taken by the resource monitor upon detecting a connection that has exceeded one or more resource limits. Enter:
KILL – to disconnect the connection from the server with no warning.
CANCEL – to cancel the connection and send a message to the client.
value – enter a value, in seconds, to limit connections to a maximum amount of busy-time. Busy-time includes the time it takes to process a query and return the results to the caller. Connections currently in the middle of a transaction but not actively processing a query are still considered busy.
attribute – the name of a connection attribute. Valid attributes are:
Attribute |
Description |
---|---|
username |
Match the user name supplied by the Open Client connection. |
appname |
Match the application name declared by the Open Client connection. |
hostname |
Match the host name on which the Open Client connection is running. |
type |
Match the type of incoming connection as either a site connection or a client connection. Possible values are:
|
regex – the value for the specified attribute. This can also be a standard SQL-style extended regular expression that describes values for a given attribute that uses this pool. You can use wildcard expressions to specify a range or group of acceptable attribute values.
This example indicates that the attribute: regex pairs that follow the header are to be constrained to a single query lasting no longer than 5 minutes (300 seconds). You can specify multiple attributes in the configuration file:
[LIMIT_RESOURCE:ACTION=KILL,BUSY=60] username: john appname: isql hostname: machine type: client