Configure 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. We can configure the IBM MQ Console and REST API to use a different timeout value by using the setmqweb command.


Before starting

To complete this task, we must be a user with certain privileges so that we can use the dspmqweb and setmqweb commands:

  • On z/OS, we must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • On all other operating systems, we must be a privileged user.

Attention:

Before issuing either the setmqweb or dspmqweb commands on z/OS, we must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.

To do this, issue the following command:
export WLP_USER_DIR=WLP_user_directory
where WLP_user_directory is the name of the directory that is passed to crtmqweb. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the mqweb server.


Procedure

  • View the current configuration of the request timeout by using the following command:

    dspmqweb properties -a

    The mqRestRequestTimeout field shows the current value for the response timeout. For more information, see dspmqweb.
  • Set the request timeout by using the following command:

    setmqweb properties -k mqRestRequestTimeout -v timeout

    where timeout specifies the time, in seconds, before the time out.

  • Reset the request timeout to the default value of 30 seconds by using the following command:

    setmqweb properties -k mqRestRequestTimeout -d

Parent topic: Configure the IBM MQ Console and REST API