Skip to main content
NetApp Knowledge Base

CSNAPC-8087: Stale entries are getting piled up in nsm db leading to primary retention failure

Views:
56
Visibility:
Public
Votes:
0
Category:
snapcenter
Specialty:
snapx
Last Updated:
4/2/2025, 2:40:58 PM

Issue

SCSQL Retention frequently fails during the RemoveBackupToSnapshotInfo function, which leads to subsequent issues with dropped MySQL connections and ensuing constraint errors (stemming from the MySQL connection being dropped after running the query for a while).
 
The following errors will be seen:
SnapManagerWeb_1234 PID=[123] TID=[28] Error deleting BackupToSnapshot records for backup id 273132. Error: An incomplete response was received from the server
SnapManagerWeb_1234 PID=[123] TID=[28] Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> MySqlConnector.MySqlException (0x80004005): Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_backuptoobjects_map`, CONSTRAINT `FK_nsm_BackupMetadata_map_nsm_Backup` FOREIGN KEY (`nsm_Backup_Id`) REFERENCES `nsm_backup` (`nsm_Backup_Id`))
2024-10-16T14:48:05.0971064+02:00 DEBUG SnapManagerWeb_1234 PID=[123] TID=[28] Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_backuptoobjects_map`, CONSTRAINT `FK_nsm_BackupMetadata_map_nsm_Backup` FOREIGN KEY (`nsm_Backup_Id`) REFERENCES `nsm_backup`
(`nsm_Backup_Id`))
 
SnapManagerWeb_1234 PID=[123] TID=[38] RemoveBackupToSnapshotInfo - Enter 2024-10-30T06:08:01.9784409+01:00 ERROR SnapManagerWeb_1234 PID=[123] TID=[38] Error deleting BackupToSnapshot records for backup id 273201. Error: An incomplete response was received from the server
SnapManagerWeb_1234 PID=[123] TID=[38] RemoveBackupToSnapshotInfo - Exit
OR:
SnapManagerWeb_425169 PID=[124] TID=[16] RemoveBackupToSnapshotInfo - Enter
SnapManagerWeb_425169 PID=[124] TID=[16] Error deleting BackupToSnapshot records for backup id 273138. Error: An existing connection was forcibly closed by the remote host.
SnapManagerWeb_425169 PID=[124] TID=[16] RemoveBackupToSnapshotInfo - Exit

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.