<domain name="Default" upgradeMode="Perform" connectionString="Data Source=.; Initial Catalog=TestPrimer; Integrated Security=True;Connection Timeout=3000" provider="sqlserver">

DirectSqlAccessor fails with timeout in this config after 1-3 minutes of sql request. DO 4.3 latest, .net 4.0


Updated at 03.08.2010 6:39:41

if I do:

var cn = new SqlConnection(Domain.Current.Configuration.ConnectionInfo.ConnectionString);
cn.Open();
var cmd = cn.CreateCommand();

It works as expected.


Updated at 03.08.2010 13:47:23

AFAIR it's the problem in command timeout, the query is really heavy


Updated at 04.08.2010 6:54:17

I haven't tried it, honestly :) I've changed to SqlConnection and left it there. The strange thing is -why SqlConnection -> Command works ok with the same connstring.

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Aug 02 '10 at 15:06

xumix's gravatar image

xumix
425757682

edited Sep 03 '10 at 16:21

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Clear - we'll check this. But is the problem related to connection (i.e. there is no SQL Server), or to command timeout (i.e. it takes too long to complete it)?

(Aug 02 '10 at 15:06) Alex Yakunin Alex%20Yakunin's gravatar image

I suspect you should use Command Timeout, but not Connection Timeout: since the domain is build, connection was established.

Use using (Session.OverrideCommandTimeout(...)) blocks for this.

(Aug 02 '10 at 15:06) Alex Yakunin Alex%20Yakunin's gravatar image

2 Answers:

Hmm, have you tried my solution? We explicitly set IDbCommand.CommandTimeout property on command execution using the value from Session, but only when it isn't null.

There is even CommandTimeoutTest checking this.

answered Aug 03 '10 at 15:01

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

I've tried the solution and it works, thanks. But anyway, it seems CommandTimeout for your sqlAccessr are smaller than default

(Aug 12 '10 at 03:08) xumix xumix's gravatar image

I am getting a timeout when doing a Domain.Build(myUrl).

answered Mar 06 '12 at 18:17

kcrismon's gravatar image

kcrismon
5222

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573
×3
×1
×1

Asked: Aug 02 '10 at 15:06

Seen: 6,933 times

Last updated: Mar 06 '12 at 18:17

powered by OSQA