IBM Support

Tuning of Rule Execution Server execution timeout

Question & Answer


Question

How do I set a timeout on a Rule Execution Server .NET rule session execution?

Answer

To set a timeout in Rule Execution Server of Rules for .NET, use the WCF (Windows Communication Foundation) timeout, which is set to 1 minute by default.

Indeed, if a Rule Execution Server session takes more than 1 minute to complete, the execution aborts and the following error message is displayed on the client side:

The request channel timed out while waiting for a reply after 00:00:58.0271632. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

As part of the .NET framework, WCF handles the communication between applications. The communication mode is set by a binding that is defined in the web.config configuration file of the IIS (Internet Information Services) site where the Rule Execution Server is installed, as follows:

  • In the web.config file, you can see a bindings element.
  • This bindings element includes a netTcpBinding.
  • netTcpBinding defines the binding properties in a binding element.
  • The binding element contains a sendTimeout attribute:
<binding name="TCPBinding" ... sendTimeout="00:01:30" ...>


You can find the web.config file in the <RuleExecutionServerInstallDir>\Bin\Execution\IISIntegration directory. After you have modified the sendTimeout attribute value, you must restart IIS for the change to take effect. To restart IIS, run the command iisreset.

You can also change the timeout for a specific execution, and override the configuration file settings for that session, with the following API calls in the client code that invokes Rule Execution Server:

...
BasicHttpBinding aBinding = new BasicHttpBinding();
aBinding.SendTimeout= new TimeSpan(0, 02, 0);     //timeout set to 2 mn
IRuleSessionContract session = provider.CreateSession(aBinding, executionServiceAddress);
...

Related Information

[{"Product":{"code":"SS6MVU","label":"WebSphere ILOG Rules for .NET"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Module:Rule Execution Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.0;3.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

rulesfor.net/FAQ/29

Document Information

Modified date:
23 June 2018

UID

swg21401585