特定の場合に、多数のアカウントを持つサイトのユーザー マネージャーをロードしようとすると、問題が発生する場合があります。以下のような症状が発生する可能性があります。
ユーザー マネージャーをロードしようとするとタイムアウトする場合があります。
解決策
タイムアウトを回避するには、下記の設定のノードにcommandTimeout属性を追加してください(なお、この属性のデフォルト値は30秒です)。
<add name="sql" type="System.Web.Security.SqlMembershipProvider" connectionStringName="core" applicationName="sitecore" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="256" commandTimeout="180"/>
現在のwebリクエストを実行中に、以下の未処理の例外が発生する場合があります。
ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Nested Exception
Exception: System.Data.SqlClient.SqlException
Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source: .Net SqlClient Data Provider
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) ...
解決策
次の設定のデフォルト値を大きくします。
<!-- DEFAULT SQL TIMEOUT
The default timeout for all SQL commands issued by the Sitecore APIs, such as
the SqlServerDataProvider, the OracleDataProvider or the SqlUtil classes.
Default value: 00:05:00 (5 minutes)
-->
<setting name="DefaultSQLTimeout" value="00:05:00" />
ユーザーのいるCoreデータベースがローカルで実行されているにも関わらず、ローディングが非常に遅い場合があります。
解決策
ロード時間を短縮するには、まずSQL Server Management StudioでCoreデータベースにあるaspnet_Membership aspnet_Usersテーブルにアクセスしてください。インデックスの断片化率を確認し、断片化率が30%を超えている場合、インデックスのデフラグの実施を検討してください。インデックスの断片化を確認し、インデックスの再構築を実施する際は、Microsoftの推奨事項に従ってください。
ASP.NET メンバーシップ プロバイダーを使用して大量(数万件)のユーザーを保管している場合に、ユーザー マネージャー アプリケーションの速度が遅くなったり、タイムアウトで失敗する可能性があります。
以下は、タイムアウトによるエラーの一例です。
[Win32Exception (0x80004005): The wait operation timed out] [SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() System.Data.SqlClient.SqlDataReader.get_MetaData() System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) System.Web.Security.SqlMembershipProvider.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) Sitecore.Security.SwitchingMembershipProvider.b__6(MembershipProviderWrapper wrapper, Int32 index, Int32 count, Int32& providerRecords) Sitecore.Common.PagingHelper`2.GetInputRecords(TInput input, GetElements getElements, Int32 startRecord, Int32 recordCount, Int32& totalRecords) Sitecore.Common.PagingHelper`2.GetRecords(Int32 pageIndex, Int32 pageSize, IEnumerable`1 inputList, GetElements getElements, Int32& totalRecords) Sitecore.Security.SwitchingMembershipProvider.GetUsers(MembershipProviderWrapperList wrappers, Int32 pageIndex, Int32 pageSize, Int32& totalRecords, GetElements getElements) Sitecore.Security.SwitchingMembershipProvider.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) Sitecore.Data.DataProviders.NullRetryer.Execute(Func`1 action, Action recover) Sitecore.Security.SitecoreMembershipProvider.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) ...
確認事項
SELECT [ApplicationName] FROM [aspnet_Applications]
解決策
単一のアプリケーションに対するaspnet_Membership_GetAllUsersストアド プロシージャを最適化するには、添付のSQLスクリプトをダウンロードして実行します。
検索ボックスの入力文字数が20文字に制限されている場合があります。
解決策