Solved

ASP.NET/SQL Timeout Error

Posted on 2009-05-11
7
372 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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