The request channel timed out while waiting for a reply after 00:01:00 error for autocompleteextender - wcf

I get this error.
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.
I am using an automcompleteextender which calls a [webmethod] which in turn calls a WCF service. The problem is when i enter 3 letters at a time the service call freezes. The extender never works. No other autocompleteextender works on the page later.
I have already tried setting sendTimeout and maxReceivedMessageSize. It doesnt help.
Please provide a word around.

Well i solved the issue. It was really strange on how it got solved.
I had to change the binding from WsHttpBinding to BasicHttpBinding
Everything else remained the same. It was just the Binding

Related

WCF Timeout Longer than Timeout Value Set

Scenario: WCF service is running. Client is attempting to connect to it and use a method on the service. Service hangs for 2-3 minutes before returning a timeout.
All timeout values are set to be 10 seconds.
binding.CloseTimeout = TimeSpan.FromSeconds(_timeout);
binding.OpenTimeout = TimeSpan.FromSeconds(_timeout);
binding.SendTimeout = TimeSpan.FromSeconds(_timeout);
binding.ReceiveTimeout = TimeSpan.FromSeconds(_timeout);
Additionally the client has its InnerChannel.OperationTimeout set to TimeSpan.FromSeconds(_timeout) as well.
_timeout comes from the app.config file and is the value "10".
What I expect is that if there is a timeout that it takes 10 seconds to resolve, and not 120-180 seconds, which is what it is doing now.
The connection appears to be fine, its calling the method that intermittently fails and times out 120-180 seconds later.
Upon trying to send the command immediately after the timeout (repeating the call basically) it sends and receives just fine.
What am I missing here? What else needs set to make sure the client is not sitting for 2-3 minutes before timing out?
All articles that I am finding deal with these five timeout values (Close, Open, Send, Receive, and Operation).
binding is of type BasicHttpBinding.
It appears that both service side and client side require these timeouts. There was no timeout value placed on the service end. Once placed, the problem appears to have reconciled itself.

Has anyone seen WCF report that it had timedout after waiting 15min but really had only been working for a few seconds

getting this error message in the wcf client log
The HTTP request to
'http://blah.svc'
has exceeded the allotted timeout of 00:15:00. The time allotted to
this operation may have been a portion of a longer timeout.
followed by
The request channel timed out while waiting for a reply after
00:14:59.9979998. 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.
However the service call had been made less than a minute before this. Any ideas as to what could cause this misreported timeout?
It happens for more than one machine so I don't think it is http://www.andyfrench.info/2010/11/wcf-service-throwing-immediate-timeout.html
Setting the following timeouts
OpenTimeout, CloseTimeout = 30 seconds
ReceiveTimeout, SendTimeout = 15 minutes
Our server log shows the request as being successful. Before and after this there have been fully successful service calls. Its not a single particular method on the service either.

Closing of WCF service (ServiceHost) not as graceful as it seems

When I call serviceHost.Close(), even if I put a timeout value serviceHost.Close(TimeSpan.FromMinutes(10)), while it stops receiving messages, it seems one or two of my messages gets lost from time to time.
I want my service to stop in the middle of an operation, but process the rest of the messages already received. Is there a way to gracefully close the service while a message is still processing?
I already set the closeTimeout and receiveTimeout in the app.config to 10 minutes, also use RequestAdditionalTime(600000) but I still get this issue. It does not close in 10 minutes, rather 1 minute at max.
Binding I am using is netMsmqBinding.
EDIT:
I temporarily fixed the problem by adding a while statement in the ServiceBase method OnStop that if the process is not finish then it will keep looping. It seems like a dirty hack, but it works for now. Let me know if there's a cleaner way to end it gracefully.

Reliable session faulting for unknown reason

I am trying to achieve the following - one client-side proxy instance (kept open) accessed by multiple threads using a reliable session. What I have managed so far is to have either A) a reliable session with a client-side proxy which is created and disposed per call or B) what I aim for, but without a reliable session.
When I enable reliable sessions on my binding however, the following behaviour is exhibited:
Client-side
Upon application startup everything appears to work fine until roughly 18 messages in to the WCF session. I firstly get the proxy.InnerChannel.Faulted event raised, then an exception is caught at the point where I am calling the method on the proxy. The exception is a System.TimeoutException, with message:
"The request channel timed out while waiting for a reply after
00:00:59.9062512. 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."
The inner exception has a similar message:
"The request operation did not complete within the allotted timeout of
00:01:00. The time allotted to this operation may have been a portion
of a longer timeout."
With the method at the top of the inner stack trace being:
System.ServiceModel.Channels.ReliableRequestSessionChannel.SyncRequest.WaitForReply(TimeSpan timeout)
I then call proxy.Close followed by proxy.Abort (catching and ignoring exceptions). If I utilize the default settings (i.e. have simply <reliableSession/>), then calling proxy. Close results in another System.Timeout exception (although this time the allotted timeout is 00:00:00), however if I override the defaults as specified above no exception is thrown.
Service-side
Utilizing WCF tracing I get a System.ServiceModel.CommunicationException, with message:
"The sequence has been terminated by the remote endpoint. The session
has stopped waiting for a particular reply. Because of this the
reliable session cannot continue. The reliable session was faulted."
And a stack trace ending at:
System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
When remotely attaching to the server I get the same message, which occurs when code execution steps over the return statement of my service in the service call which causes the error.
The puzzling thing to me is that the service is stable and runs with options A) or B) as decribed at the beginning of my post, and occurs after a varying number of messages (around 18). The former fact points to there being nothing wrong with the code (indeed I have checked that no exceptions are thrown), and the latter just serves to confuse me and is why I modified the settings on the reliable session binding.
I am quite stuck on this. Can anyone suggest why the reliable session would fault in such a way?
You need to overide the default ,and set your timeout higher or lower depends on cause,it seems the timout is causing an exception just after some other program has started or stopped just a millisecond before the exception
OR most likely cause
your alloted timeouts may be added as a continous single timeout of 18 min or 18 calls ..plus other usage times are added together as one complete time out .which may be why it asking for more time.
in any case ,you have to staticly set your own settings because automatic default will always over ride any changes you made..
type in your local host http binding name and set your closetimeout at maybe 5.00 min
and maybe even change the request time as well . Requesttimeout 2.00 min
closeTimeout="00:05:00"

Timeout Question about Invoking a Remote WCF Service

When I invoke a remote WCF service I get the following timeout:
The request channel timed out while waiting for a reply after 00:00:59.2810338. 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.
Please note that I am sending a single object which is LOADED with a LOT of data.
Any ideas how to fix this issue and is this a problem on the client (ME) or the Server.
Given the size, have you tried increasing your maxBufferSize/maxReceivedMessageSize in your binding?
Chunk your data into smaller pieces if possible and try again. This is a server setting that you will need to work around or request that the service provider increase it.
Without a stack trace I'm can't be 100% sure, but I'm relatively certain this is a client side exception. If you know it's going to take more than a minute to send the data all you need to do is change the sendTimeout on your binding to be whatever amount of time you need it to be.