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
Solved

ASP.NET/SQL Timeout Error

Posted on 2009-05-11
7
370 Views
Last Modified: 2012-05-06
I have a asp.net site using a stored procedure that runs 5 count queries on a table, each having there own criteria. When i run on local machine it runs in seconds. When I execute the stored procedure it takes 1 second, however. On the server, when the asp.net website executes the stored procedure it takes 5 minutes. This was working last week and now it is timing out if i don't allow unlimited timeout. Every other stored procedure works fine.

Also, the stored procedure works fine when the counts are lower numbers, only when the numbers return a high result is there an issue. Again, when i execute the stored procedure in sql management studio it only takes 1 second to run no matter the size of the results.
Any ideas?
0
Comment
Question by:bmaitdepartment
7 Comments
 
LVL 8

Expert Comment

by:ppittle
ID: 24356359
What does your connection string look like?  (minus the password, of course).
0
 
LVL 11

Expert Comment

by:Salim Fayad
ID: 24356378
You can post your .NET code where you are calling this stored procedure?
0
 
LVL 1

Author Comment

by:bmaitdepartment
ID: 24356389
<add name="ReportsConn" connectionString="server = <server name>;Connect Timeout=200; database=<db name>;User id=<user id>;password=<password>"/>
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Accepted Solution

by:
bmaitdepartment earned 0 total points
ID: 24357431
I rebooted the server and it works now.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24360394
>>I rebooted the server and it works now.<<
If that is your "solution", I suspect you will be back shortly with a more, how should I say this, permanent solution.
0
 
LVL 1

Author Comment

by:bmaitdepartment
ID: 24363853
Thank you for your most helpful post, acperkins. I wish I hadn't closed the question already or I would have given you all the points. That's too bad. Are you always this, how should I say this, nice and friendly on experts exchange?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24365506
>>Are you always this, how should I say this, nice and friendly on experts exchange?<<
It really depends on the questioner :)

But seriously, you do not honestly think that by rebooting the server it has solved your problem?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell File Sort 8 41
Where is this file? 3 25
asp.net open new page without popup blocker 8 18
Why use this lambda? 12 25
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

766 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