"timeout period elapsed prior to completion of the operation"

The sql query I do takes around 2 minutes 30 seconds (from my computer to sql server using SQL Query Anaylizer).

I estimate that the computer running my web app (also on same network in office as my computer but with dual cpus) should also take same amount of time.

Problem is the query IS NOT getting a chance to complete. It times out after about a minute or so.

Possible reasons I have checked for:
1. Sql Server is getting hit hard:

Checked. Im only one hitting it and its the only query. Sql server is on t1 with 256ram, 1.6Ghz cpu.
(Ram maybe an issue but if SQLQA can do it in 2 minute, im guessing so can ADO.NET in under 4 minutes)

2. Default connection string settings for time out is 15 seconds:

I bumped this up to 480.... "Connect Timeout=480;" is now in the connection string. 480 is seconds which is 4 minutes..plenty of time!!

3. im using ASP.NET forms authentication with timeout, maybe its cutting out early:

Checked my web.config page, and I set timeout="5" (which I confirmed in the docs...5 is 5 minutes).

4. ?? Need your help, cuz im f@$#n stumped now!

- john
[1179 byte] By [johnmcTemp] at [2007-11-17 17:01:12]
# 1 Re: "timeout period elapsed prior to completion of the operation"
****...just asked for suggestions. :/
johnmcTemp at 2007-11-10 3:31:44 >
# 2 Re: "timeout period elapsed prior to completion of the operation"
Posted this question on a different board and received the solution within that DAY...and it was almost too easy of an answer, but i wont argue with results - connections dont timeout now.
johnmcTemp at 2007-11-10 3:32:48 >
# 3 Re: "timeout period elapsed prior to completion of the operation"
Apparently no one knew the answer to your question.
And if you found the answer, why didn't you post it?

I'm having the same trouble.

If you can please post what you found.

Dg
DaddyGweedo at 2007-11-10 3:33:46 >
# 4 Re: "timeout period elapsed prior to completion of the operation"
Here is what solved my problem.

I set the connection timeout, but I was not setting the command timeout.

So if you have this problem be sure to set it as below:

sqlCommand1.CommandTimeout = 60

Very simple...
DaddyGweedo at 2007-11-10 3:34:54 >