Configuring the response timeout
By default, the IBM® MQ Console and REST API times out if the time taken to send a response back to a client is longer than 30 seconds. From IBM MQ 9.0.4, you can configure the IBM MQ Console and REST API to use a different timeout value by using the setmqweb command. In IBM MQ 9.0.3, and earlier, you can configure the IBM MQ Console and REST API to use a different timeout value by editing the mqwebuser.xml file.
Before you begin
dspmqweb properties -a
The
mqRestRequestTimeout
field shows the current value for the response timeout. For
more information, see dspmqweb.Before issuing either the setmqweb or dspmqweb commands on z/OS®, you must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.
export WLP_USER_DIR=WLP_user_directory
where
WLP_user_directory
is the name of the directory that is passed
to crtmqweb.sh
. For
example:export WLP_USER_DIR=/var/mqm/web/installation1
For more information, see Create the Liberty server definition.
Procedure
- From IBM MQ 9.0.4, use the setmqweb
properties command:
setmqweb properties -k mqRestRequestTimeout -v timeout
where timeout specifies the time, in seconds, before the time out.
- For IBM MQ 9.0.3 and earlier, edit the
mqwebuser.xml file:
- Open the mqwebuser.xml file.The mqwebuser.xml file can be found in one of the following directories:
- On UNIX, Linux®, and Windows:
MQ_DATA_DIRECTORY
/web/installations/installationName/servers/mqweb - On z/OS:
WLP_user_directory/servers/mqweb
where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.
- On UNIX, Linux®, and Windows:
- Configure the timeout by adding or editing the following line in the
mqwebuser.xml file, within the
<server>
tags:<variable name="mqRestRequestTimeout" value="timeout" />
where timeout specifies the time, in seconds, before the time out.
- Open the mqwebuser.xml file.