Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

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?
0
bmaitdepartment
Asked:
bmaitdepartment
1 Solution
 
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
 
bmaitdepartmentAuthor Commented:
<add name="ReportsConn" connectionString="server = <server name>;Connect Timeout=200; database=<db name>;User id=<user id>;password=<password>"/>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
bmaitdepartmentAuthor Commented:
I rebooted the server and it works now.
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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now