2011-09-13 14 views
1

エンティティフレームワークで深刻な問題& SQL Server 2008、お手伝いをしてください! システムはローカルで正常に動作しますが、運用サーバーでの負荷テスト中に10人以上のユーザーに対して次のエラーが発生します。コマンドを実行するには、オープンで使用可能な接続が必要です。接続の現在の状態が破損しています

このエラーが発生した後、ユーザーはもうログインできません。

'/'アプリケーションでサーバーエラーが発生しました。 コマンドを実行するには、オープンで使用可能な接続が必要です。接続の現在の状態は破損しています。ここで

は、SQL Serverのログ

3005 
An unhandled exception has occurred. 

9/13/2011 3:41:14 AM 

9/13/2011 7:41:14 AM 

73b3f335f4de45fa8c4ef2f22809300b 

4911 

482 

0 

/LM/W3SVC/14/ROOT-3-129603711416579333 

Full 

/

E:\WebSites\Medtrack2.0\ 

COLO-VDEV01 
15864 

w3wp.exe 

NT AUTHORITY\NETWORK SERVICE 

InvalidOperationException 

Execution of the command requires an open and available connection. The connection's current state is broken. at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) at Dashboard.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

http://38.127.112.89:9010/Dashboard.aspx 

/Dashboard.aspx 

119.148.4.83 

JMiranda 

True 

Forms 

NT AUTHORITY\NETWORK SERVICE 

11 

NT AUTHORITY\NETWORK SERVICE 

False 

at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source) at Dashboard.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

が任意のアイデアを持っているのですか?

+0

[EFは、サーバーがダウンしたために発生する無効な操作のリカバリの可能性があります](http://stackoverflow.com/questions/2863224/ef-recovery-from-invalidoperationexception-caused -by-server-being-down) –

答えて

0

はどのようにしてのObjectContextを格納していますか? EFの観点から、各ユーザーがObjectContextへの一意の参照を取得するようにする必要があります。これを行うために、私はObjectContextをHttpContext.Current.Itemsコレクションに格納して共有します。 Itemsコレクションの詳細については、これを参照してください。http://abhijitjana.net/2011/01/14/when-we-can-use-httpcontext-current-items-to-stores-data-in-asp-net/

関連する問題