I am getting the follow error on Apply retention polcies on the server. It looks like a sql issue but not entirely sure where it is coming from. This is not on a deploy but rather from the server. Let me know if you need more information.
The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
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.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at Octopus.Core.RelationalStorage.TransientFaultHandling.IDbCommandExtensions.<>c__DisplayClass5_0.<ExecuteReaderWithRetry>b__0() in Y:\work\refs\tags\3.1.5\source\Octopus.Core\RelationalStorage\TransientFaultHandling\IDbCommandExtensions.cs:line 67
at Octopus.Shared.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\TransientFaultHandling\RetryPolicy.cs:line 215
at Octopus.Core.RelationalStorage.RelationalTransaction.<Stream>d__23`1.MoveNext() in Y:\work\refs\tags\3.1.5\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 237
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
at Octopus.Core.RelationalStorage.QueryBuilder`1.ToDictionary(Func`2 keySelector) in Y:\work\refs\tags\3.1.5\source\Octopus.Core\RelationalStorage\QueryBuilder.cs:line 123
at Octopus.Server.Orchestration.Retention.ApplyRetentionPoliciesTaskController.ApplyRetentionPolicy(Lifecycle lifecycle, IList`1 projects, IList`1 releases) in Y:\work\refs\tags\3.1.5\source\Octopus.Server\Orchestration\Retention\ApplyRetentionPoliciesTaskController.cs:line 143
at Octopus.Server.Orchestration.Retention.ApplyRetentionPoliciesTaskController.ApplyRetentionPolicy(IGrouping`2 policy) in Y:\work\refs\tags\3.1.5\source\Octopus.Server\Orchestration\Retention\ApplyRetentionPoliciesTaskController.cs:line 124
at Octopus.Shared.Tasks.OctoThreadClosure`1.Execute() in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Tasks\OctoThreadClosure.cs:line 29
ClientConnectionId:18a16d3a-0b4e-41a6-9a25-5ef22003e99b
Octopus.Server version 3.1.5 (3.1.5+Branch.master.Sha.a3fb854d900077b8b028687f3a4ca01c59e84f56)