arachnode.net
An Open Source C# web crawler with Lucene.NET search using SQL Server 2008/2012/2014/2016/CE An Open Source C# web crawler with Lucene.NET search using MongoDB/RavenDB/Hadoop

Completely Open Source @ GitHub

Does arachnode.net scale? | Download the latest release

Exception: Violation of PRIMARY KEY constraint 'PK_HyperLinks_Hosts_Discoveries'. Cannot insert duplicate key in object 'dbo.HyperLinks_Hosts_Discoveries'. The statement has been terminated.

rated by 0 users
Answered (Verified) This post has 1 verified answer | 1 Reply | 2 Followers

Top 10 Contributor
229 Posts
megetron posted on Thu, Sep 3 2009 3:41 PM

Hi, here is the third exception. it happens with 1.2 releasse version:

Created ID AbsoluteUri1 AbsoluteUri2 HelpLink Message Source StackTrace
2009-09-04 00:41:38.327 7 http://sratim.co.il/users http://sratim.co.il/users/usersbyroles.aspx NULL Violation of PRIMARY KEY constraint 'PK_HyperLinks_Hosts_Discoveries'. Cannot insert duplicate key in object 'dbo.HyperLinks_Hosts_Discoveries'.  The statement has been terminated. .Net SqlClient Data Provider    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     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.ExecuteScalar()     at Arachnode.DataSource.ArachnodeDataSetTableAdapters.QueriesTableAdapter.InsertHyperLink(String WebPageAbsoluteUri, String HyperLinkAbsoluteUri, Nullable`1 ClassifyAbsoluteUri, Nullable`1& HyperLinkID) in E:\DEVELOPMENT\yeshira12\DataSource\ArachnodeDataSet.Designer.cs:line 12878     at Arachnode.DataAccess.ArachnodeDAO.InsertHyperLink(String webPageAbsoluteUri, String hyperLinkAbsoluteUri) in E:\DEVELOPMENT\yeshira12\DataAccess\ArachnodeDAO.cs:line 1066

Answered (Verified) Verified Answer

Top 10 Contributor
1,905 Posts
Verified by megetron

This occurs because we don't lock this table when inserting rows.

We do check using EXISTS but don't lock using a TRANSACTION for performance reasons.  If this error is present, the record is safely recorded.

You can ignore this error.

For best service when you require assistance:

  1. Check the DisallowedAbsoluteUris and Exceptions tables first.
  2. Cut and paste actual exceptions from the Exceptions table.
  3. Include screenshots.

Skype: arachnodedotnet

Page 1 of 1 (2 items) | RSS
An Open Source C# web crawler with Lucene.NET search using SQL 2008/2012/CE

copyright 2004-2017, arachnode.net LLC