'Getting timeout error - increase the send timeout value on binding
WCF service returns timeout error as below.
The request channel timed out while waiting for a reply after XX:XX: XX increases the send timeout value on binding. The time allotted to this operation may have been a portion of a longer timeout
But I'm getting this error within 1min while browsing my website. And I have mentioned the timeout value set to 00:10:00 (10min) in binding configuration (web.config).
The same service is working in my local system but when I hosted in server then I'm getting this issue. As I observed, SQL query takes around 1 min: 20sec time to execute in server.
Do I need to update anywhere those send timeout values?
Can you please suggest this?
Thanks.
Solution 1:[1]
That error occurs because the send timeout on the client side (not the service side) is timing out. The send timeout is configured on the <binding/>
element of the binding associate with your client endpoint.
The entire roundtrip (from client to server, service-side processing and return trip back to the client) must be completed before the send timeout expires.
Solution 2:[2]
This is usually caused not by a WCF connection timeout, but by a slow response caused by other issues, such as Binding configuration issues on the server and client side, a database connection failure. Try to check the database connection string and whether the WCF running account has permission to connect to the database.
Considering the following config.
<binding name="http" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" sendTimeout="00:10:00" receiveTimeout="00:10:00">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
Feel free to let me know if the problem still exists.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Flydog57 |
Solution 2 |