Due to unstable network infrastructure or insufficient SQL database performance, the process of adding publisher operations to the SQL database might fail with the following time-out exception:
[Error] There was an error adding 1 publisher operations. - Error : "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (258): The wait operation timed out. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at Dapper.SqlMapper.ExecuteMultiImplAsync(IDbConnection cnn, CommandDefinition command, IEnumerable multiExec) in /_/Dapper/SqlMapper.Async.cs:line 654 at Sitecore.Framework.Publishing.Service.Sql.PublisherOperations.PublisherOperationProvider.<>c__DisplayClass2_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.<>c__DisplayClass8_0`1.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper.ExecuteAsync[T](DbConnection connection, Func`1 sqlWork, Func`3 commandRetryPolicy, CancellationToken cancellationToken) at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.ExecuteAsync[T](Func`2 dbWork) at Sitecore.Framework.Publishing.Service.Sql.PublisherOperations.PublisherOperationProvider.Add(IDatabaseConnection connection, IReadOnlyCollection`1 operations) at Sitecore.Framework.Publishing.PublisherOperations.PublisherOperationRepository.AddOperations(IReadOnlyCollection`1 operations) at Sitecore.Framework.Publishing.PublisherOperations.PublisherOperationService.AddPublisherOperations(IReadOnlyCollection`1 operations)
It might lead to blocking all existing SqlConnections to the master database. Therefore this makes it impossible to interact with the database causing the following error:
[Error] There was an error testing the connection "Service" - Error: "One or more errors occurred. (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.)" System.AggregateException: One or more errors occurred. (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.)
To resolve the issue, download and install the hotfix for Publishing Service 6.0: SC Hotfix 552114-1.zip
Be aware that the hotfix was built for a specific Publishing Service version, and must not be installed on other Publishing Service versions or in combination with other hotfixes. In case any other hotfixes have already been installed on a certain Publishing Service instance, send a request for a compatibility check to Sitecore Support.
Note that the ZIP file contents must be extracted to locate installation instructions and related files inside. The hotfixes must be installed on a CM instance and then synced with other instances using standard development practices.