We have a release “0.0.1”. A quick explanation of what this release is for…
We have 2 Database projects, the main database project and a hotfix project. The main project deploys every 8 weeks as part of our release cycle, while the hotfixes are just SQL scripts that deploy in-between releases. The next main release would contain these hotfixes, so once a main release happens the previous hotfixes are irrelevant. Since there is no way to delete release information from Octopus I created a hotfix release “0.0.1” to denote that there are not currently any hotfixes deployed.
Today I went to deploy 0.0.1 to a tenant and received the error:
Octopus v2019.2.2
Error while executing SQL command in transaction 'https://octopus.xxx.xxx/api/Spaces-1/artifacts?skip=0&take=10&regarding=Releases-3651&order=asc 08e2b6ee961a4388a0ac34fd0157f392': The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request. The command being executed was: SELECT COUNT(*) FROM dbo.[Artifact] WHERE ((([SpaceId] = 'Spaces-1'))) AND ([ServerTaskId] IN (@servertaskid0_1, @servertaskid1_2, @servertaskid2_3, @servertaskid3_4, @servertaskid4_5, @servertaskid5_6, @servertaskid6_7, @servertaskid7_8, @servertaskid8_9, @servertaskid9_10, @servertaskid10_11, @servertaskid11_12, @servertaskid12_13, @servertaskid13_14, @servertaskid14_15, @servertaskid15_16,
<large chunk removed>
@servertaskid2934_2935, @servertaskid2935_2936, @servertaskid2936_2937, @servertaskid2937_2938, @servertaskid2938_2939, @servertaskid2939_2940))
System.Exception
at Nevermore.RelationalTransaction.ExecuteScalar[T](String query, CommandParameterValues args, Nullable`1 commandTimeoutSeconds)
at Nevermore.QueryBuilder`2.Count()
at Nevermore.QueryBuilder`2.ToList(Int32 skip, Int32 take, Int32& totalResults)
at Octopus.Server.Web.Api.Actions.ListArtifactsResponder.ExecuteRegistered()
at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
--Inner Exception--
SQL Error 8003 - 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
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, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Nevermore.Transient.IDbCommandExtensions.<>c__DisplayClass11_0.<ExecuteScalarWithRetry>b__0()
at Nevermore.Transient.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at Nevermore.RelationalTransaction.ExecuteScalar[T](String query, CommandParameterValues args, Nullable`1 commandTimeoutSeconds)