Attachmate Worldwide  |   Contact Us  |   NetIQ.com
Home » Support » Solution Library

Technical Notes

Revising Method Timeout to Address Client Timeouts
Technical Note 10044
Last Reviewed 17-Aug-2006
Applies To
Verastream Host Integrator version 5.0 or higher
Summary

This technical note describes how to modify the Verastream connector method timeout property to address client timeouts.

Timeout Errors

When a client sends a request to a Verastream Host Integrator (VHI) Session Server, there is a default timeout of 30 seconds. If there is no response from the server within that time period, your client application may get the following error:

2820 Timed out while waiting for data.

This error may also appear in a client WCP trace (as described in Technical Note 40007).

Background

A client method timeout may occur if you have a very large procedure or any operation that takes longer than 30 seconds to complete, or (in version 5.5 or higher) if you have an event handler that takes a long time to complete. The underlying cause may be captured in the server log (see Technical Note 40032) or server model debug messages file (see Technical Note 10066).

To avoid this error, the client method timeout can be increased to exceed the model timeouts (navigation, operation, event handler, etc.).

Revising the Default Timeout

The following two examples use the setMethodTimeout method to revise the default timeout.

Note:

  • These are Java examples; however, a very similar technique can be used for other languages we support. Please review the installed API documentation for examples that match the language of your client code.
  • If you have a Web Builder client (version 5.0 or higher) and you want only to revise MethodTimeout for an individual table procedure, see Technical Note 10038.

Example One

For web projects created in Web Builder (version 5.5 or higher), you can rebuild your project with a different global timeout property as follows:

  1. Open Web Builder and select your project.
  2. Right-click and select Properties.
  3. Select the Java Web Application option on the left and then change Method timeout to something greater than 30 seconds.
  4. Click OK.
  5. Re-select your project and right-click Rebuild, and then click the Build button.

Example Two

Alternatively, you can revise your client code directly by adding a setMethodTimeout method:

The timeout for this method is in milliseconds, so if you want to set it for five minutes, set it equal to 300000. Add this method in the code before the function call that you believe will take a long time, for example, before a procedure call.

You may want to reset the timeout method back to a smaller number after the procedure is complete if you think the rest of the calls you make to the server will have a quicker response time. If you want the timeout to persist for the entire client connection, then you can set setMethodTimeout at the beginning of the client code. The following is from the product Java API documentation:

setMethodTimeout

public void setMethodTimeout(int timeout)
throws ApptrieveException

Sets the method timeout for a Host Integrator Server session.

Reasons for failure include: Server session has not been established.

Parameters:

timeout - int - The timeout period in milliseconds

Throws:

ApptrieveException - - if a Host Integrator server error occurs

See Also: getMethodTimeout()

Related Technical Notes
10038 Modifying MethodTimeout for an Individual Table Procedure
10066 Configuring Recording of Model Debug Messages on the Verastream Server
40007 WCP Data Object Tracing
40032 Verastream Host Integrator Server Logging
40999 Verastream Host Integrator Technical Notes

Did this technical note answer your question?

Yes    No    Somewhat     Not sure yet

Additional comments about this tech note:

Need further help? For technical support, please contact Support.