Telerik.OpenAccess - System.Data.SqlClient.SqlException (0x8

Posted by Community Admin on 04-Aug-2018 20:39

Telerik.OpenAccess - System.Data.SqlClient.SqlException (0x80131904)

All Replies

Posted by Community Admin on 17-Feb-2015 00:00

Hello, 

I just upgraded the Prod environment to V 6.0 4210 from V 4.4 2117

When opening a specific log post I notice the following error on the server event viewer

System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   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.TryCloseInternal(Boolean closeReader)
   at System.Data.SqlClient.SqlDataReader.Close()
   at Telerik.OpenAccess.Runtime.Logging.LoggingDbDataReader.Close()
ClientConnectionId:17158031-a3e5-493e-b85a-14babda9a0de
Error Number:-2,State:0,Class:11
CommandText=SELECT a.[id] AS COL1, b.[voa_class] AS COL2, a.[categories] AS COL3, a.[content] AS COL4, a.[expiration_date] AS COL5, a.[item_hash] AS COL6, a.[lnk] AS COL7, a.[owner_email] AS COL8, a.[owner_first_name] AS COL9, a.[owner_last_name] AS COL10, a.[publication_date] AS COL11, a.[summary] AS COL12, a.[title] AS COL13, a.[username] AS COL14, b.[application_name] AS COL15, b.[last_modified] AS COL16, b.[original_item_id] AS COL17, b.[original_parent_id] AS COL18, b.[voa_version] AS COL19 FROM [dynmc_906fc1536f34c50b80cf7149] a JOIN [sf_dynamic_type_base] AS b ON (a.[id] = b.[id]) WHERE b.[application_name] = '/PublishingItems' AND b.[original_item_id] = @p0                                       ORDER BY COL1 , RowsRead=501, ConnectionState=Open, Transaction=1
driver.rs.close

 

Or this one

System.Data.SqlClient.SqlException (0x80131904): Could not find prepared statement with handle -1.
   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)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   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 Telerik.OpenAccess.Runtime.Logging.LoggingDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
ClientConnectionId:17158031-a3e5-493e-b85a-14babda9a0de
Error Number:8179,State:1,Class:16
CommandType=Text, CommandTimeout=30, ConnectionState=Open, Transaction=1
driver.stat.execQuery       183 SELECT a.[id] AS COL1, b.[voa_class] AS COL2, a.[categories] AS COL3, a.[content] AS COL4, a.[expiration_date] AS COL5, a.[item_hash] AS COL6, a.[lnk] AS COL7, a.[owner_email] AS COL8, a.[owner_first_name] AS COL9, a.[owner_last_name] AS COL10, a.[publication_date] AS COL11, a.[summary] AS COL12, a.[title] AS COL13, a.[username] AS COL14, b.[application_name] AS COL15, b.[last_modified] AS COL16, b.[original_item_id] AS COL17, b.[original_parent_id] AS COL18, b.[voa_version] AS COL19 FROM [dynmc_906fc1536f34c50b80cf7149] a JOIN [sf_dynamic_type_base] AS b ON (a.[id] = b.[id]) WHERE b.[application_name] = '/PublishingItems' AND b.[original_item_id] = @p0                                       ORDER BY COL1 

 

Sitefinity log file I noticed the following error

----------------------------------------
Timestamp: 2/17/2015 7:54:01 PM

Message: HandlingInstanceID: 821365a4-f084-44fc-b198-acd6a486257e
An exception of type 'Telerik.OpenAccess.Exceptions.DataStoreException' occurred and was caught.
------------------------------------------------------------------------------------------------
02/17/2015 11:54:01
Type : Telerik.OpenAccess.Exceptions.DataStoreException, Telerik.OpenAccess, Version=2013.1.418.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342
Message : Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Could not find prepared statement with handle -1.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT a.[id] AS COL1, b.[voa_class] AS COL2, a.[categories] AS COL3, a.[content] AS COL4, a.[expiration_date] AS COL5, a.[item_hash] AS COL6, a.[lnk] AS COL7, a.[owner_email] AS COL8, a.[owner_first_name] AS COL9, a.[owner_last_name] AS COL10, a.[publication_date] AS COL11, a.[summary] AS COL12, a.[title] AS COL13, a.[username] AS COL14, b.[application_name] AS COL15, b.[last_modified] AS COL16, b.[original_item_id] AS COL17, b.[original_parent_id] AS COL18, b.[voa_version] AS COL19 FROM [dynmc_906fc1536f34c50b80cf7149] a JOIN [sf_dynamic_type_base] AS b ON (a.[id] = b.[id]) WHERE b.[application_name] = '/PublishingItems' AND b.[original_item_id] = ?                                       ORDER BY COL1  Telerik.OpenAccess.RT.sql.SQLException: Could not find prepared statement with handle -1.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
Source : Telerik.OpenAccess.Runtime
Help link : 
InnerExceptions : System.Exception[]
FailedObject : 
BackendError : Telerik.OpenAccess.RT.sql.SQLException: Could not find prepared statement with handle -1.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
Reason : Runtime
CanRetry : False
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Exception Throw()
HResult : -2146233088
Stack Trace :    at OpenAccessRuntime.ExceptionWrapper.Throw()
   at OpenAccessRuntime.storagemanager.logging.LoggingStorageManager.fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, Int32 skipAmount)
   at OpenAccessRuntime.DataObjects.ForwardQueryResult.Initialize()
   at OpenAccessRuntime.DataObjects.ForwardQueryResult.get_Item(Int32 indexParam)
   at OpenAccessRuntime.ListEnumerator.setCurrent(Int32 _pos)
   at OpenAccessRuntime.ListEnumerator.Move(Int32 relative)
   at Telerik.OpenAccess.Query.TypedEnumerator`1.MoveNext()
   at Telerik.Sitefinity.Publishing.PersistentPublishingPoint.HandleItemDeleted(Guid itemId, Type itemType, Boolean deleteChildren)
   at Telerik.Sitefinity.Publishing.PersistentPublishingPoint.RemoveItems(IList`1 items)
   at Telerik.Sitefinity.Publishing.Pipes.ContentInboundPipe.PushData(IList`1 items)
   at Telerik.Sitefinity.Publishing.PublishingManager.CallSubscribedPipes(IEnumerable`1 args)

Additional Info:

MachineName : MachineName
TimeStamp : 2/17/2015 7:54:01 PM
FullName : Telerik.Sitefinity.Utilities, Version=6.0.4210.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/2/ROOT-1-130686535231488767
ThreadIdentity : Anonymous
WindowsIdentity : WindowsIdentity
Requested URL : https://www.blog article link
Inner Exception
---------------
Type : Telerik.OpenAccess.RT.sql.SQLException, Telerik.OpenAccess.Runtime, Version=2013.1.418.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342
Message : Could not find prepared statement with handle -1.
Source : Telerik.OpenAccess.Runtime
Help link : 
ErrorCode : 8179
Number : 8179
ObjectId : 
Description : SQLState=;Could not find prepared statement with handle -1.
Data : System.Collections.ListDictionaryInternal
TargetSite : Telerik.OpenAccess.RT.sql.ResultSet executeQuery()
HResult : -2146233088
Stack Trace :    at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
  at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
  at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()



Category: ErrorLog

Priority: 0

EventId: 9010

Severity: Warning

Title:Enterprise Library Exception Handling

Machine: Machine

App Domain: /LM/W3SVC/2/ROOT-1-130686535231488767

ProcessId: 2188

Process Name: c:\windows\system32\inetsrv\w3wp.exe

Thread Name: 

Win32 ThreadId:8992

Extended Properties: 
----------------------------------------

Posted by Community Admin on 25-Feb-2015 00:00

Hi Ahmad,

Looking at the error logs, the issue seem related to Publishing system background task running. Please try to stop the "PublishingSystemInvokerTask" in the database before starting the upgrade.

I hope this information helps.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 25-Feb-2015 00:00

Svetoslav,

 

I have the following questions,

- How can I disable the PublishingSystemInvokerTask?

- Do I need to enable it after the upgrade?

- Is this going to resolve the issue of the duplicated records of each blog article in table "dynmc_906fc1536f34c50b80cf7149", because I noticed loading one of the blog articles will retrieve thousands of records.

 I performed the following delete statements and that improved the blog performance

DECLARE @TempRowsWillNotDeleted TABLE (id uniqueidentifier,original_id uniqueidentifier,last_modified datetime)
DECLARE @TempJoinRows TABLE (id uniqueidentifier)

--[sf_dynamic_type_base] has many relations with other tables so we should save the IDs of rows which have relation with [dynmc_906fc1536f34c50b80cf7149]
insert into @TempJoinRows
select b.id 
from [dynmc_906fc1536f34c50b80cf7149] d JOIN [sf_dynamic_type_base] AS b ON (d.[id] = b.[id])



insert into @TempRowsWillNotDeleted
select b.id,b.original_item_id,b.last_modified
from [sf_dynamic_type_base] as b
inner join
(select original_item_id  ,Max([last_modified]) as MaxDate 
from [dynmc_906fc1536f34c50b80cf7149] d JOIN [sf_dynamic_type_base] AS b ON (d.[id] = b.[id]) 
group by original_item_id) as a
on b.original_item_id = a.original_item_id
and b.last_modified = a.MaxDate

--Forign Table has oly one relation with [sf_dynamic_type_base] and should be deleted first
delete FROM [dynmc_906fc1536f34c50b80cf7149]  
 WHERE  id not in
 (
 select ID from @TempRowsWillNotDeleted
 )

 --Delete rows from primary key which only have relation with [dynmc_906fc1536f34c50b80cf7149]
delete [sf_dynamic_type_base] 
FROM [sf_dynamic_type_base] b join @TempJoinRows T on  b.id = T.id
 WHERE  b.id not in
 (
 select ID from @TempRowsWillNotDeleted
 )

 

Thanks!

Posted by Community Admin on 02-Mar-2015 00:00

Hi Ahmad,

I would recommend you to open a support ticket in order to inspect the project and the upgrade more detailed.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed