Environment
Situation
When a client sends a request to a Verastream Host Integrator (VHI) session server, there is a default timeout of 30 or 60 seconds. If there is no response from the server within that time period, your client may get one of the following errors:
[2820] Verastream client timed out waiting for a response.
[2820] Timed out while waiting for data.
The above error may also appear in a client WCP trace (as described in KB 7021304). If you are using web services, a similar error may appear in a SOAP fault or log file:
WARN com.attachmate.ws.impl.HttpBaseHandler - com.attachmate.ws.ServiceFaultException: Verastream client timed out waiting for a response.
Resolution
The underlying cause may be captured in the server log (see KB 7021303) or server model debug messages file (see KB 7021543).
To avoid this error, the client method timeout can be increased to exceed the model timeouts (such as navigation, operation, or event handler timeouts).
Modifying the Method Timeout
How you change the default method timeout depends on the type of client you are using to call the connector.
Web Services
The configuration of the web services SOAP stack method timeout depends on the VHI version:
- Version 7.1 SP1 (7.1.1142) or higher: The web services method timeout is configurable in Administrative Console on a global, pool-specific, or model-specific basis. The default is 60000 msec (60 seconds).
- Versions 7.0.982 through 7.1.221: The web services method timeout is configurable by completing the following steps:
- Edit the service-ctx.xml file, located in the following directory:
Windows: %VHI_ROOT%\sesssrvr\services\ws\META-INF
UNIX/Linux: %VHI_ROOT%/lib/container/services/ws/META-INF
- Uncomment and configure the global methodTimeout property. The default 30000 msec (30 seconds).
- After saving changes to this file, you must restart the session server service for changes to take effect. For information on manually restarting the service, see KB 7021352.
- Versions 7.0.961 through 7.0.980: The web services method timeout is 30 seconds and not configurable.
Web Builder Project
In Web Builder, the method timeout is configurable in the Project Properties of your web application project. (The default is 30 seconds.) After modifying the properties, remember to re-build your project.
Connector API
In your client code, call the setMethodTimeout method after the session is established and before your procedure call (or other call that will take a long time).
- Java: http://docs2.attachmate.com/verastream/vhi/7.5sp1/en/rtopic/com.attachmate.vhi.help/API-javadoc/connector/com/wrq/apptrieve/appconn/AppConnSession.html#setMethodTimeout(int)
- .NET: See the installed VHIDotNetConnectorHelp.chm file.
- COM: http://docs2.attachmate.com/verastream/vhi/7.5sp1/en/topic/com.attachmate.vhi.help/html/apiconn/appconncom_vb_isessionex.xhtml#setmethodtimeout
- C: http://docs2.attachmate.com/verastream/vhi/7.5sp1/en/topic/com.attachmate.vhi.help/html/apiconn/appconn_c_methods.xhtml#SetMethodTimeout
The timeout for the setMethodTimeout method is in milliseconds, so if you want to set it for five minutes, set it to 300000.
You may want to set the timeout method back to a smaller value after the procedure is complete if you expect the rest of the calls you make to the server will have a quicker response time.