2100 parameters is not enough

2100 parameters is not enough

Hello. I already wrote that We have real big deployment projects and now I tryed to update our custom deployment step template in ‘3542 usages’, i just clicked ‘Update all’ and got error:

{
  "ErrorMessage": "Exception occurred while executing a reader for `SELECT *\r\nFROM dbo.[DeploymentProcess]\r\nWHERE ([Id] IN (......))\r\nORDER BY [Id]`\r\nSQL 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.",
  "FullException": "Exception occurred while executing a reader for `SELECT *\r\nFROM dbo.[DeploymentProcess]\r\nWHERE ([Id] IN ( @id3531_3531, @id3532_3532, @id3533_3533))\r\nORDER BY [Id]`\r\nSystem.Exception\r\n   at Nevermore.Transient.IDbCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy commandRetryPolicy, RetryPolicy connectionRetryPolicy, String operationName)\r\n   at Nevermore.Transient.IDbCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, String operationName)\r\n   at Nevermore.RelationalTransaction.Stream\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at Octopus.Server.Web.Api.Actions.DeploymentActionUpdate.ActionTemplateActionsUpdateResponder.ExecuteRegistered(String actionTemplateId)\r\n   at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)\r\n   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)\r\n   at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)\r\n   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)\r\n\r\n--Inner Exception--\r\nSQL 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.\r\nSystem.Data.SqlClient.SqlException\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\r\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\r\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)\r\n   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)\r\n   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)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\r\n   at Nevermore.Transient.IDbCommandExtensions.<>c__DisplayClass5_0.<ExecuteReaderWithRetry>b__0()\r\n   at Nevermore.Transient.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n   at Nevermore.Transient.IDbCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy commandRetryPolicy, RetryPolicy connectionRetryPolicy, String operationName)"
}

Main paer of error: 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.",

Our octopus server version: Octopus v2018.9.15

PS: I made this message after 4 try ), because this message has char limit in 32000 and I can not past sql query qith params because error "Sorry, you can only mention 10 users in post’

Hi,

Thanks for getting in touch, and sorry you encountered this problem.

I’ve raised an issue for this bug here, you can use that link to track our progress as we fix the bug. That link also contains some possible workarounds in the meantime.

Hopefully this will be fixed quite soon, and you will simply have to update to the latest version of Octopus to get the fix. The workarounds for this bug are not straightforward, so if this is not urgent it would be best if you could wait for the bug fix.

Let me know if you have any questions or other concerns.

Regards,
Tom

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.