Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SqlException Timeout expired

Posted on 2006-06-27
5
Medium Priority
?
1,942 Views
Last Modified: 2008-01-09
Hello peps,

I got a gridview control that uses an SqlDataSource.  The SqlDataSource is set to an store procedure on SQL 2005 server.  Here is the connection string:
Data Source=RM-SQL01\SQL05;Initial Catalog=Lists;Persist Security Info=True;User ID=*****;Password=*******;Connection Timeout=120;

As you can see I did put the connection timeout equal to 120 mins.  But still times out in about 30 sec.

This is happening because the store procedure is compiling.  After the first user compiles the sp than other users should fly.

I noticed this happens in the beginning of the week, seems that SQL Server is deleting the compiled sp out of it's memory during the weekend when no one is using the sp.  Is there away to tell SQL server to keep the compiled sp indefintly, then if things change I manually compile the sp?

Or is there another timeout property I am missing?  I cant find a timeout property in the SqlDataSource Control.

Thanks in advance
0
Comment
Question by:boricua1213
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 2

Author Comment

by:boricua1213
ID: 16994694
Well I figured how to set command timeout on sqlDataSource:

Add a Selecting Event to the SqlDataSource and then add

    Protected Sub FailedCalls_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles FailedCalls.Selecting
        e.Command.CommandTimeout = 120
    End Sub

FailedCalls is the SqlDataSource

Any idea how to keep the sp in memory, cause it takes about 50 secs to compile after compile the sp flys?
0
 
LVL 6

Accepted Solution

by:
Nandakumar Sakthivel earned 2000 total points
ID: 17000871
Hi,
   Set the command timeout as 0 it will wait indefinitely

Thanks,
Nanda
0
 
LVL 6

Expert Comment

by:Nandakumar Sakthivel
ID: 17159496
Volunteer,
           I think that trying my solution will help in  solving the problem.

Thanks,
Nanda
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question