rbaldwin
Posts: 172
|
Posted: 07/11/2008, 5:21 AM |
|
i'm running asp.net (vb)
my database is sql server 2005
i'm still using oledb to connect.
The error i'm getting is
System.Data.OleDb.OleDbException: Timeout expired
i'm pretty good with ccs but i'm no .net wiz.
i am working with support on this but was hoping the community would chime in.
|
|
|
tsgroman
Posts: 64
|
Posted: 07/13/2008, 1:48 PM |
|
This error generally means that the connection time needed for the transaction you're attempting exceeds the connection time limit set in SQL Server.
Option one would be to optimize your query.
Option two would be to increase the connection timeout by:
1. Open SQL Server Enterprise Manager.
2. Right click on the server name.
3. Select properties.
4. Choose the Connections tab.
5. Increase the query timeout value.
6. Click OK.
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/13/2008, 2:13 PM |
|
Well, i have allow remote connections checked and the timeout is set to 600 seconds
I think in my case it means i need to set commandtimeout which i've done but it seems to be ignored.
but thanks.
|
|
|
tsgroman
Posts: 64
|
Posted: 07/13/2008, 2:58 PM |
|
Setting the timeout value to 0 makes it unlimited. Try that and see if it has any effect.
If it just hangs indefinitely, I'd say it's a query problem. Are you using any type of looping logic?
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/14/2008, 4:39 AM |
|
the query in query analyzer takes 42 seconds and its simply jointing two tables nothing fancy. so 600 should be fine. but i tried it and it still times out after 30 sec.
|
|
|
Trigger
|
Posted: 07/14/2008, 7:03 PM |
|
Are you sure that it is actually connecting to the server?
If you look in the activity monitor when the SQL is running do you see you
application
connected to the server?
"rbaldwin" <rbaldwin@forum.codecharge> wrote in message
news:8487b3ad750a94@news.codecharge.com...
> the query in query analyzer takes 42 seconds and its simply jointing two
> tables
> nothing fancy. so 600 should be fine. but i tried it and it still times
> out
> after 30 sec.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/15/2008, 4:37 AM |
|
yes and the log shows it times out.
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/15/2008, 4:59 AM |
|
I found this article http://www.codeproject.com/KB/database/TableAdaptrCommandTimeout.aspx
And support is telling me i need to modify /components/CodeCharge.Data.OleDb.vb
but it surpasses my expertise.
|
|
|
tsgroman
Posts: 64
|
Posted: 07/15/2008, 9:19 AM |
|
rbaldwin,
Please provide more information...
Have you identified the cause of the problem? What?
What's different about your hosting/development environement than others?
Did support mention what the conditions are that require modifying /components/CodeCharge.Data.OleDb.vb?
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/15/2008, 9:59 AM |
|
the default for a commandTimout via oledb is 30 seconds.
it's not a server setting. it can't be set via the connectionstring and there is no ccs setting
it must be set as part of the oledb call which takes place in CodeCharge.Data.OleDb.vb
in oledb.vb there are a number of Dim's for command i need to be able to add something like
command.commandTimeout = x seconds.
However apparently the commandTimeout property is not exposed. this is all explained in the article i mention to replies up.
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/16/2008, 11:39 AM |
|
The whole timeout issue was a "red herring" it seems a couple of indexes on the tables i were using were corrupt. i rebuilt them and my problem went away. still takes over 30 seconds but doesn't time out.
|
|
|
tsgroman
Posts: 64
|
Posted: 07/16/2008, 2:50 PM |
|
That's great it's working!
FYI: The OleDbConnection ConnectionTimout property can be modified through your ConnectionString by adding a value for Connection Timout.
|
|
|
andrefogelman
Posts: 117
|
Posted: 07/19/2008, 2:33 AM |
|
I had problems with long time running queries so I edited the web.config file.
It is a text file and easy to change from within codecharge.
I set the sessionstate timeout and the httpRuntime executionTimeout
-->
<globalization
requestEncoding="windows-1252"
responseEncoding="windows-1252"
fileEncoding="windows-1252"
/>
<sessionState
mode="InProc"
cookieless="false"
timeout="10000"
/>
<httpRuntime executionTimeout="860000" />
</system.web>
</configuration>
<!--End WebConfig system.web-->
|
|
|