ASP.NET/SQL Timeout Error

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?
LVL 1
bmaitdepartmentAsked:
Who is Participating?
 
bmaitdepartmentConnect With a Mentor Author Commented:
I rebooted the server and it works now.
0
 
ppittleCommented:
What does your connection string look like?  (minus the password, of course).
0
 
Salim FayadCommented:
You can post your .NET code where you are calling this stored procedure?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
bmaitdepartmentAuthor Commented:
<add name="ReportsConn" connectionString="server = <server name>;Connect Timeout=200; database=<db name>;User id=<user id>;password=<password>"/>
0
 
Anthony PerkinsCommented:
>>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
 
bmaitdepartmentAuthor Commented:
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
 
Anthony PerkinsCommented:
>>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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.