In this post, I am going to talk about a very weird issue we faced and how we troubleshooted it. One fine morning, a QA in our team updated us that she is unable to see anything on CD server. All she sees is the Sitecore aspx page with error saying layout not found. We started looking for the item in web db to find out what was wrong and phewww, web db was missing all the items we had built ever.
To fix this issue temporarily, we published everything from master to web db. But this kept happening over and over. We started looking at the Publishing Dashboard to get any cues and we saw hundreds of queued jobs as in snapshot below -
System.AggregateException: One or more errors occurred. ---> 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.Common.ADP.ExceptionWithStackTrace(Exception e)
--- 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 Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.<>c__DisplayClass18_0.<<OpenAsync>b__0>d.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 Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<OpenNewConnection>d__33.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.get_UnderlyingConnection()
at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<ExecuteAsync>d__27`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 Sitecore.Framework.Publishing.Service.Sql.PublishJobQueue.PublishJobQueueProvider.<CreateJob>d__2.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 Sitecore.Framework.Publishing.PublishJobQueue.PublishJobQueueRepository.<CreateJob>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 Sitecore.Framework.Publishing.PublishJobQueue.PublishJobQueueService.<>c__DisplayClass10_0.<<QueueJob>b__0>d.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 Sitecore.Framework.Publishing.PublishJobQueue.PublishJobQueueService.<Handle>d__13`1.MoveNext()
---> (Inner Exception #0) 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.Common.ADP.ExceptionWithStackTrace(Exception e)
--- 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 Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.<>c__DisplayClass18_0.<<OpenAsync>b__0>d.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 Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<OpenNewConnection>d__33.MoveNext()<---
- Add ";Max Pool Size=200" in the connection strings file to extend the pool size for the master database in Publishing Service
- Increase the 'CommandTimeout' of the '<sql-backend-default>' connection behavior that can be found in the Publishing Service installation guide which already discussed during the meeting
If you try to publish a /sitecore item in non-existing language version, SPS deletes all the items in the web database. | 479723 |
Comments
Post a Comment