H
Hypercoder
I'm encountering some strange behavior after deploying a ASP.net 3.5 website
to production, i'm unable to reproduce these in my dev environment. This
error seems to occur very randomly but it's occuring enough to be a real
cause for concern. The errors occur a couple times a week and the website is
hit with constant traffic 24x7. Below are the two errors that are
encountered. I had read something about MARS causing errors like this but
since LINQ-to-SQL is a black box in how it works with ADO.net this is proving
to be difficult to troubleshoot, any help would be greatly appreciated.
Error Messages:
"There is already an open DataReader associated with this Command which must
be closed first."
stack trace:
at
System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand
command) at
System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String
method, SqlCommand command) at
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, 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.Common.DbCommand.ExecuteReader() 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.DataContext.ExecuteMethodCall(Object instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
totalResultCount)
"Invalid attempt to call FieldCount when reader is closed."
stack trace:
at System.Data.SqlClient.SqlDataReader.get_FieldCount() at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1.GetColumnOrdinals(NamedColumn[]
namedColumns) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1..ctor(ObjectReaderSession`1
session, NamedColumn[] namedColumns, Object[] globals, Object[] arguments,
Int32 nLocals) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderSession`1.CreateReader[TObject](Func`2
fnMaterialize, NamedColumn[] namedColumns, Object[] globals, Int32 nLocals,
Boolean disposeDataReader) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderFactory`2.Create(DbDataReader
dataReader, Boolean disposeDataReader, IReaderProvider provider, Object[]
parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries) 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.DataContext.ExecuteMethodCall(Object instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
totalResultCount)
to production, i'm unable to reproduce these in my dev environment. This
error seems to occur very randomly but it's occuring enough to be a real
cause for concern. The errors occur a couple times a week and the website is
hit with constant traffic 24x7. Below are the two errors that are
encountered. I had read something about MARS causing errors like this but
since LINQ-to-SQL is a black box in how it works with ADO.net this is proving
to be difficult to troubleshoot, any help would be greatly appreciated.
Error Messages:
"There is already an open DataReader associated with this Command which must
be closed first."
stack trace:
at
System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand
command) at
System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String
method, SqlCommand command) at
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, 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.Common.DbCommand.ExecuteReader() 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.DataContext.ExecuteMethodCall(Object instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
totalResultCount)
"Invalid attempt to call FieldCount when reader is closed."
stack trace:
at System.Data.SqlClient.SqlDataReader.get_FieldCount() at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1.GetColumnOrdinals(NamedColumn[]
namedColumns) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderBase`1..ctor(ObjectReaderSession`1
session, NamedColumn[] namedColumns, Object[] globals, Object[] arguments,
Int32 nLocals) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderSession`1.CreateReader[TObject](Func`2
fnMaterialize, NamedColumn[] namedColumns, Object[] globals, Int32 nLocals,
Boolean disposeDataReader) at
System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReaderFactory`2.Create(DbDataReader
dataReader, Boolean disposeDataReader, IReaderProvider provider, Object[]
parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries) 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.DataContext.ExecuteMethodCall(Object instance,
MethodInfo methodInfo, Object[] parameters) at
System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[]
parameters) at
SystemLayer.FactoryView.DAL.Search.SearchController.getFctysByFullTextFilter(String
filterArgs, String rowsPerPage, String rowsBeforeThisPage, Int32&
totalResultCount)