This project has moved. For the latest updates, please go here.


Linq2SqlJobStore | Failed to get jobs from the database.


Hello, I am trying this service for a few months in development environment, and it suddenly started to give the following exception:

BackgroundWorkerService.Logic.Implementation.JobStore.Linq2Sql.Linq2SqlJobStore | Failed to get jobs from the database. | System.Data.SqlClient.SqlException (0x80131904): The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
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.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataQuery1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List
1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at BackgroundWorkerService.Logic.Implementation.JobStore.Linq2Sql.Linq2SqlJobStore.GetJobs(UInt32 skip, UInt32 take, Guid[] jobUniqueIds, Int64[] jobIds, JobStatus[] jobStatuses, Byte[] queueIds, String[] typeNames, String[] applications, String[] groups)
Closed Jan 9, 2014 at 11:29 PM by dawidpotgieter


susahin80 wrote Nov 11, 2013 at 7:51 AM

I noticed that this happens only if I access the management UI.
If I dont open the Web UI, this exception does not occur.

dawidpotgieter wrote Jan 9, 2014 at 10:59 PM

Hi There,

Sorry I haven't responded earlier, doesn't seem as if CodePlex is sending out notifications anymore, so hopefully it's not too late.

I haven't seen this error before, but I expect there's an issue with too many jobs for the UI.

Thanks for the report, will look into it.

dawidpotgieter wrote Jan 9, 2014 at 11:19 PM


I see where this can cause a problem in the UI :

default.aspx.cs, line 91 :
var jobs = accessPoint.GetJobs(new GetJobsRequest
    JobIds = alerts.Select(a => a.JobId).ToArray(),
    Take = int.MaxValue,
If there are too many alerts (more than 2100 I guess), it will try to load the jobs by id. Just clear out your alerts or move this logic around a bit to "page" the GetJobs call.

wrote Jan 9, 2014 at 11:26 PM

wrote Jan 9, 2014 at 11:29 PM

Resolved with changeset 28033.