Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> ORMQueryExecutionException: thread aborted on SQL Server
 

Pages: 1
Bugs & Issues
ORMQueryExecutionException: thread aborted on SQL Server
Page:1/1 

  Print all messages in this thread  
Poster Message
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 19-Jan-2013 22:35:29.  
I have this issue consistently. It appears to be a SQL Server problem, but I was just wondering if anybody has any insight. I pulled out the query and manually ran it, and it took under a second, returning less than a dozen rows.

I just converted the project from 2.6 to 3.5, hoping that maybe the problem would magically go away. I'm targeting .NET 4.0, on SQL Server 2005 (9.00.5266.00).

Wow, I didn't realize the customer was running such an old version of SQL Server until I created this post. I wonder if simply upgrading would fix the problem.

Jim

SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException: An exception was caught during the execution of a retrieval query: Thread was being aborted.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception. ---> System.Threading.ThreadAbortException: Thread was being aborted.
at SNIReadSync(SNI_Conn* , SNI_Packet** , Int32 )
at SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr& packet, Int32 timeout)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
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.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)
--- End of inner exception stack trace ---
at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowDataTableRetrievalQuery(IRetrievalQuery queryToExecute, DbDataAdapter dataAdapterToUse, DataTable tableToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchTypedList(IEntityFields2 fieldCollectionToFetch, DataTable dataTableToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize)
at Chevron.GlobalMetrics.Reporting.Reports.MetricProviders.Metric70MetricProvider.ProcessSBUTarget(SBUEntity sbu)

[rest elided]
  Top
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 19-Jan-2013 22:37:26.  
Here are the contents of the QueryExecuted property:

Query: SELECT SUM(([GlobalMetricsP].[dbo].[AllMetricValues].[Value] * @p2)) AS [Total], [GlobalMetricsP].[dbo].[AllMetricValues].[Year], [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID], [GlobalMetricsP].[dbo].[AllMetricValues].[DrillingCategoryNumber] FROM [GlobalMetricsP].[dbo].[AllMetricValues] WHERE ( ( ( ( ( ( ( [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] = @p3) OR [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] = @p4) OR [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] = @p5) OR [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] = @p6) OR [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] = @p7) AND [GlobalMetricsP].[dbo].[AllMetricValues].[MetricID] = @p8 AND [GlobalMetricsP].[dbo].[AllMetricValues].[Year] = @p9)) GROUP BY [GlobalMetricsP].[dbo].[AllMetricValues].[Year], [GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID], [GlobalMetricsP].[dbo].[AllMetricValues].[DrillingCategoryNumber] ORDER BY [GlobalMetricsP].[dbo].[AllMetricValues].[Year] ASC,[GlobalMetricsP].[dbo].[AllMetricValues].[ReportingEntityID] ASC,[GlobalMetricsP].[dbo].[AllMetricValues].[DrillingCategoryNumber] ASC
    Parameter: @p2 : Int32. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 1.
    Parameter: @p3 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 14.
    Parameter: @p4 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 15.
    Parameter: @p5 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 16.
    Parameter: @p6 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 17.
    Parameter: @p7 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 32.
    Parameter: @p8 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 71.
    Parameter: @p9 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 2012.


  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8138 posts
# Posted on: 21-Jan-2013 04:08:46.  
I'm not sure about this, but apparently it has to do with ASP.Net (runtime execution timeout), or by calling Thread.Abort() somewhere in your code. Give a try with those threads:

http://www.datasprings.com/dnn-modules/dynamic-user-directory/purgeusers-sninativemethodwrapper-snipacketgetconnection-error

http://stackoverflow.com/questions/4389582/what-does-thread-was-being-aborted-at-snireadsyncsni-conn-sni-packet

http://stackoverflow.com/questions/424531/sqlclient-calls-causing-thread-was-being-aborted-at-sninativemethodwrapper-snip
David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 21-Jan-2013 20:36:56.  
I had thought maybe it was a timeout problem, but was unsure because of the exception. Per the first link, I made an addition to web.config:

Code:
<system.web>
    <httpRuntime maxRequestLength="8092" executionTimeout="900"/>


(I increased the maxRequestLength to possibly solve a separate issue).

The report now runs. Thanks!
Jim


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.