Thursday, January 23, 2020

Fixing the Issue Recycle Bin and Archive shows all the items to the users coming from Active directory in sitecore 9.1

Fixing the issue Recycle Bin and Archive shows all the items to the users coming from sitecore Active directory.it's working perfectly fine for sitecore users(sitecore\some user).the below response got from sitecore support.

By default, inheritance is disabled for "Can See All Items" item for sitecore\everyone role. This affects only users in sitecore domain. To achieve the same behavior for a custom domain please disable inheritance for the item for <your domain>\everyone role.
as for above response i have performed disable the inheritance for custom domain(active directory domain for me bt\Evryone ) on the item /sitecore/system/Settings/Security/Policies/Recycle Bin/Can See All Items in the core database.


Analtics server running on max cpu,pooled with maximum of xconnect connection and timeout requests sitecore 9.1

I have gone through the crazy High CPU issue on the Analytics servers.The Interesting point is,
In Analytics databases(Reporting,Processing.Pools,ReferenceData,Collection) are sepereated from content databases(Master,Web,Core).if you take Analtics Databases server down Site will not go down but High CPU may take your site down/slow.

Our Database Team figure out and told There are Maximum Pooled Xconnect connections with the user name Collection user on the Analytics server.that's why it's causing High CPU.Then I went to Xconnect logs found the below errors. created a sitecore support ticket with the thread dumps and provide the logs from Xconnect and App servers.


System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Sitecore.Xdb.ReferenceData.SqlServer.Commands.SqlServerReferenceDataProviderCommand`1.Execute()
   at Sitecore.Xdb.ReferenceData.Service.CommonReadOnlyReferenceDataService`1.GetDefinitions[TDefinition](IEnumerable`1 criteria, Boolean latestActiveOnly, Func`2 converter)
   at Sitecore.Xdb.ReferenceData.Service.ServiceCounterDecorator.CallWithCounters[TReturn](PerformanceCounterKey countKey, PerformanceCounterKey countPerSecKey, PerformanceCounterKey averageTimeKey, PerformanceCounterKey averageTimeBaseKey, Func`1 operation)
   at Sitecore.Xdb.ReferenceData.Service.ReferenceDataTransportServiceCountersDecorator.GetDefinitions(IEnumerable`1 criteria, Boolean latestActiveOnly)
   at Sitecore.Xdb.ReferenceData.Web.ReferenceDataDefinitionController.Get(IEnumerable`1 criteria, Boolean latestActiveOnly)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()



finally sitecore provided solution with the below two url's.

https://kb.sitecore.net/articles/595419
https://kb.sitecore.net/articles/224364

the first one is the sql stored procedure need to run on the Refernce Data Database.we followed the sitecore Kb article instructions and ran on the Sql Refernce Data Database In Test and then prod.
That solved the Issue.
Hope this helps you!.

Finding Which Content Delivery server are you on in sitecore

Sometimes Testing Purpose we need to find which delivery server are we on.you should create a server.html file and put it under root folder of your website it should has the Text like CD1 for CD1 server,create another server.html file and add root folder of CD2 containg Text:CD2. so when you browse the below url,you will see the respective message based on the server you are on.

[You Domain]/server.html