Link to home
Start Free TrialLog in
Avatar of bmaitdepartment
bmaitdepartmentFlag for United States of America

asked on

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?
Avatar of ppittle
ppittle
Flag of United States of America image

What does your connection string look like?  (minus the password, of course).
Avatar of Salim Fayad
You can post your .NET code where you are calling this stored procedure?
Avatar of bmaitdepartment

ASKER

<add name="ReportsConn" connectionString="server = <server name>;Connect Timeout=200; database=<db name>;User id=<user id>;password=<password>"/>
ASKER CERTIFIED SOLUTION
Avatar of bmaitdepartment
bmaitdepartment
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>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.
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?
>>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?