Timeouts for WCF services

  • 22 December 2014
  • 3 replies
  • 24 views

Badge +1

We have a WCF service that constantly times out when called. Retrying the service usually resolves the issue. That being said, on the server, we set the sendTimeout to 5 minutes (along with other timeouts). However, there seems to not be a way to control these values on the client (K2). Our service timesouts periodically at 1 minute (the default if no timeouts are specified in the binding).

 

Is anyone familiar with how to setup an instance of a WCF Service in K2 with a binding configuration? Or, at the very least, a way to specify some of the binding settings such as "sendTimeout"?


3 replies

Badge +10

f you have increased the WCF timeout could this be the datbase timeout kicking in. I think you may have to set the database timeout as well if you WCF calls a database. Although by default on a Microsfot SQL database, the timeout should be about 30 seconds, maybe someone has changed this to one minute.

 

Hope this heps

Badge +1

Thanks for your reply s0m3one.

 

There are no SQL servers involved. We have a custom WCF service that is registered as a Service Object. The methods on the service can take upwards of 2 minutes to complete. The SendTimeout on the binding for the service is set to 5 minutes. However, both the client AND the server must have their bindings set to 5 minutes. If the client is set to 1 minute while the server is set to 5, the request will still fail at 1 minute.

 

What I need to know or understand is - does K2 provide any way for these binding configurations to be changed on the client side? (e.g. the Service Object XML)

 

Here is the error message. Hopefully this helps clarify what I'm asking:

 

Message: The request channel timed out while waiting for a reply after 00:01:00. 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.;

 

Thanks,

Paul

Badge +10

Apoligies for the late reply,

 

To answer your question:

"What I need to know or understand is - does K2 provide any way for these binding configurations to be changed on the client side? (e.g. the Service Object XML)".

 

This is definately possible but I dont think on the service object XML. The way I do it is create a custom service object project. Then add the webservice reference to that web service that you are using to that service object project. The binding and enpoints can then be configured in the hostserver config file. You can change the timeout and message size etc that you require there. Please let me know if you require more information on how to create a custom service object project. There should be guide/blog floating around here to explain in detail.

Reply