Timeout issuehttp://forums.asp.net/t/1794462.aspx/1?Timeout+issueMon, 23 Apr 2012 10:47:06 -040017944624939919http://forums.asp.net/p/1794462/4939919.aspx/1?Timeout+issueTimeout issue <p>I have a webform I'm trying to run. It has 6 grids each with it own sqldatasource control. The sprocs do some calculations to compare two years of purchases. When I open the page using a DB with a large number of transactions for the two years, I get a server timeout. Is there anyway to change the timeout or&nbsp; could my issue be with the sqldatasource controls?</p> <p>Here is the error message:</p> <h2 style="color:maroon; font-family:Verdana; font-size:14pt; font-weight:normal"> <i>Timeout expired. &nbsp;The timeout period elapsed prior to completion of the operation or the server is not responding.</i></h2> <p><span style=""></span><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style=""><b style="color:black; font-family:Verdana; font-weight:bold; margin-top:-5px">Description:<span class="Apple-converted-space">&nbsp;</span></b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<span class="Apple-converted-space">&nbsp;</span><br> <b style="color:black; font-family:Verdana; font-weight:bold; margin-top:-5px">Exception Details:<span class="Apple-converted-space">&nbsp;</span></b>System.Data.SqlClient.SqlException: Timeout expired. &nbsp;The timeout period elapsed prior to completion of the operation or the server is not responding.</span></p> 2012-04-19T02:37:37-04:004939929http://forums.asp.net/p/1794462/4939929.aspx/1?Re+Timeout+issueRe: Timeout issue <p>Is there a way to set the timeout on an sqldatasource control?</p> <p>My sprocs are taking about 35 to 38 seconds to run, each. There are 6 of them.</p> 2012-04-19T02:54:45-04:004946130http://forums.asp.net/p/1794462/4946130.aspx/1?Re+Timeout+issueRe: Timeout issue <p>Hi,</p> <p>Try to set <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx"> SqlCommand<span>.</span>CommandTimeout </a>value to 500. By default,the value&nbsp;is 30 seconds.</p> <p>or &nbsp;add a Connect Timeout to your c<span class="sent_en"><span class="29-1-1" title="">onnection</span> <span class="29-2-1" title="">string:</span></span></p> <p><span class="sent_en"><span class="29-2-1" title=""><span class="pun">&lt;</span><span class="pln">add key</span><span class="pun">=</span><span class="str">&quot;ConnectionName&quot;</span><span class="pln"> value</span><span class="pun">=</span><span class="str">&quot;server=LocalHost;uid=sa;pwd=;database=DataBaseName;<strong>Connect Timeout</strong>=200; pooling='true'; Max Pool Size=200&quot;<span class="pun">/&gt;</span></span></span></span></p> 2012-04-23T10:47:06-04:00