[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

SP Timeout from .Net, not from Query Analyzer

Asked by Check in Programming for ASP.NET, .NET, MS SQL Server

Tags: sp, asp, procedure, stored

I've got an odd problem that's cropped up twice now.  I know how to fix it but not how to prevent it from happening again.  We've got a .Net Webform using VB.Net 2003 that calls a stored procedure called usp_sp1 (names have been changed to protect the innocent).  The stored procedure is in a SQL 2000 database on another server in the same room.  When I call this stored procedure, it takes longer than 30 seconds and times out.  I've got another web page that lets administrators run SQL code directly.  When I type in usp_sp1 and run it in this other page, it times out after 30 seconds.  When I open the stored procedure, copy all of the code, and run it in this other admin web page, the results come back in 5 seconds.  

When I open Query Analyzer with the same SQL authenticated account that the web pages use, and call usp_sp1, the results come back in 5 seconds.  At this point, we were pretty lost and could not figure out where the problem was coming from.  DBAs pointed to .Net, .Net developers pointed to the database.

We created a new stored procedure called usp_sp2 and pasted in the contents from usp_sp1.  When we call that stored procedure from the admin webform, it comes back in 5 seconds.  In Query Analyzer it comes back in 5 seconds.  

We renamed usp_sp1 to usp_sp1_bad, opened it and edited it's name within as well.  We then renamed usp_sp2 to usp_sp1, opened it and edited it's name within.  Now when we call the original webform, the results come back in 5 seconds.  The ASP worker process was NOT restarted, the web server was NOT rebooted, essentially, nothing was changed on the web server.

We then decided to try and figure out what was wrong with usp_sp1_bad.  We called it from the admin page and it came back in 5 seconds.  Huh?  When it was called usp_sp1 it timed out after 30 but now that it's called usp_sp1_bad, it comes back in 5 seconds.  When we call the new usp_sp1 from the original webform, from the admin page, or from Query Analyzer, it also comes back in 5 seconds.  

Basically, at this point, we're thinking that had we renamed usp_sp1 to usp_sp2 then renamed it back to usp_sp1 it probably would have fixed it as well.  

The question though, is not how to fix it.  The question is why the heck is this happening and how do we prevent it from happening again?  This same stored procedure has done this twice in the last two months.  Both times we fixed it the same way.  This time we let it stay broken for at least a half an hour if not longer to try and troubleshoot what the heck is causing it and got nowhere.  Nothing out of the ordinary is going on at the web server or database server when the problem occurs.

Anyone have any ideas or ever seen this happen before?  

Thanks,

Check
[+][-]06/25/07 05:12 PM, ID: 19360200Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/07 07:05 PM, ID: 19360575Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/26/07 04:47 AM, ID: 19362725Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/26/07 08:09 AM, ID: 19364451Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/26/07 08:23 AM, ID: 19364632Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Programming for ASP.NET, .NET, MS SQL Server
Tags: sp, asp, procedure, stored
Sign Up Now!
Solution Provided By: mastoo
Participating Experts: 3
Solution Grade: A
 
[+][-]06/26/07 08:43 AM, ID: 19364895Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89