wcf call timeout

R

Roy

I have a client calling into a wcf service and get the following message:

This request operation sent to net.tcp://localhost:9992/MyService did not
receive a reply within the configured timeout (00:01:00). The time allotted
to this operation may have been a portion of a longer timeout. This may be
because the service is still processing the operation or because the service
was unable to send a reply message. Please consider increasing the operation
timeout (by casting the channel/proxy to IContextChannel and setting the
OperationTimeout property) and ensure that the service is able to connect to
the client.

If the return value become smaller, I don't get the above error.
What is the reason for it and how to resolve it?
 
M

Michael Nemtsev [MVP]

Hello Roy,

increase timeouts settings (open/close/receive/send) in your <binding> element

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


R> I have a client calling into a wcf service and get the following
R> message:
R>
R> This request operation sent to net.tcp://localhost:9992/MyService did
R> not receive a reply within the configured timeout (00:01:00). The
R> time allotted to this operation may have been a portion of a longer
R> timeout. This may be because the service is still processing the
R> operation or because the service was unable to send a reply message.
R> Please consider increasing the operation timeout (by casting the
R> channel/proxy to IContextChannel and setting the OperationTimeout
R> property) and ensure that the service is able to connect to the
R> client.
R>
R> If the return value become smaller, I don't get the above error. What
R> is the reason for it and how to resolve it?
R>
 
R

Roy

What are the key words for the elements? Are they client side or service side?
Any examples?
 
M

Michael Nemtsev [MVP]

Hello Roy,

on client side you should have the <bindings> section where u specify your
binding configuration like <basicHttpBinding> or <wsHttpBinding>
Inside that binding your have <binding name="..." > tag, and there you set
the timeouts. press Ctrl+Space inside binding tag and intelliscence shows
your the timeout attributes

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


R> What are the key words for the elements? Are they client side or
R> service side? Any examples?
R>
R> "Michael Nemtsev [MVP]" wrote:
R>
Hello Roy,

increase timeouts settings (open/close/receive/send) in your
<binding> element

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

R> I have a client calling into a wcf service and get the following
R> message:
R>
R> This request operation sent to net.tcp://localhost:9992/MyService
did
R> not receive a reply within the configured timeout (00:01:00). The
R> time allotted to this operation may have been a portion of a
longer
R> timeout. This may be because the service is still processing the
R> operation or because the service was unable to send a reply
message.
R> Please consider increasing the operation timeout (by casting the
R> channel/proxy to IContextChannel and setting the OperationTimeout
R> property) and ensure that the service is able to connect to the
R> client.
R>
R> If the return value become smaller, I don't get the above error.
What
R> is the reason for it and how to resolve it?
R
 
R

Roy

Michael,
I tried to increase the open/close/send/receive timeout on both the client
and service side and it does not work. The error message still complains the
"configured timeout (00:01:00)" even though I set them longer than that.
I found the service actually received the call add returned the value. If
the message is small, the client will get the reply immediately. However, if
I increased the message to a certain size (I tried to increase the size), the
client will no longer get it and experience a timeout. My guess is the size
of the message might caused the problem. Any idea to correct it?
Thanks.
Roy

Michael Nemtsev said:
Hello Roy,

on client side you should have the <bindings> section where u specify your
binding configuration like <basicHttpBinding> or <wsHttpBinding>
Inside that binding your have <binding name="..." > tag, and there you set
the timeouts. press Ctrl+Space inside binding tag and intelliscence shows
your the timeout attributes

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


R> What are the key words for the elements? Are they client side or
R> service side? Any examples?
R>
R> "Michael Nemtsev [MVP]" wrote:
R>
Hello Roy,

increase timeouts settings (open/close/receive/send) in your
<binding> element

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

R> I have a client calling into a wcf service and get the following
R> message:
R>
R> This request operation sent to net.tcp://localhost:9992/MyService
did
R> not receive a reply within the configured timeout (00:01:00). The
R> time allotted to this operation may have been a portion of a
longer
R> timeout. This may be because the service is still processing the
R> operation or because the service was unable to send a reply
message.
R> Please consider increasing the operation timeout (by casting the
R> channel/proxy to IContextChannel and setting the OperationTimeout
R> property) and ensure that the service is able to connect to the
R> client.
R>
R> If the return value become smaller, I don't get the above error.
What
R> is the reason for it and how to resolve it?
R>
 
R

Roy

I enabled tracing. On the service side, I got

<Exception><ExceptionType>System.ServiceModel.CommunicationException,
System.ServiceModel, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The socket connection
was aborted. This could be caused by an error processing your message or a
receive timeout being exceeded by the remote host, or an underlying network
resource issue. Local socket timeout was '00:01:00'.</Message><StackTrace>
at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32
offset, Int32 size, Boolean immediate, TimeSpan timeout)
at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer,
Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout, BufferManager
bufferManager).....

On client side, I got
<ExceptionString>System.ServiceModel.CommunicationException: The maximum
message size quota for incoming messages (65536) has been exceeded. To
increase the quota, use the MaxReceivedMessageSize property on the
appropriate binding element. ---&gt;
System.ServiceModel.QuotaExceededException: The maximum message size quota
for incoming messages (65536) has been exceeded. To increase the quota, use
the MaxReceivedMessageSize property on the appropriate binding element.
--- End of inner exception stack trace
---</ExceptionString><InnerException><ExceptionType>System.ServiceModel.QuotaExceededException,
System.ServiceModel, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The maximum message
size quota for incoming messages (65536) has been exceeded. To increase the
quota, use the MaxReceivedMessageSize property on the appropriate binding
element.</Message><StackTrace> at
System.ServiceModel.Channels.ClientDuplexConnectionReader.DecodeMessage(Byte[]
buffer, Int32&amp; offset, Int32&amp; size, Boolean&amp; isAtEOF, TimeSpan
timeout)
at
System.ServiceModel.Channels.SessionConnectionReader.DecodeMessage(TimeSpan
timeout)
at
System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.ServiceModel.Channels.SocketConnection.FinishRead()
at
System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(Boolean
haveResult, Int32 error, Int32 bytesRead)....


I increased maxReceivedMessageSize. But it still not work. Any ideas?
 
N

Noah

I've run into this same issue. Has anyone found a solution to this? I've
tried increasing message sizes, changing up the config files, and a number of
other things, but I consistently get the same issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top