cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to purge nodes.

ashwini
Champ in-the-making
Champ in-the-making
Hello All ,

Everynight around 21:00 alfresco throws below exception:

2012-09-02 21:00:17,076  ERROR [node.db.DeletedNodeCleanupWorker] [DefaultScheduler_Worker-9] Failed to purge nodes.  If the purgable set is too large for the available DB resources 
  then the nodes can be purged manually as well.
  Set log level to WARN for this class to get exception log:
   Max commit time: 1344020400060
   Error:      
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`alfresco`.`alf_child_assoc`, CONSTRAINT `fk_alf_cass_pnode` FOREIGN KEY (`parent_node_id`) REFERENCES `alf_node` (`id`))
### The error may involve alfresco.node.delete_NodesByTxnCommitTime-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`alfresco`.`alf_child_assoc`, CONSTRAINT `fk_alf_cass_pnode` FOREIGN KEY (`parent_node_id`) REFERENCES `alf_node` (`id`))
; SQL []; Cannot delete or update a parent row: a foreign key constraint fails (`alfresco`.`alf_child_assoc`, CONSTRAINT `fk_alf_cass_pnode` FOREIGN KEY (`parent_node_id`) REFERENCES `alf_node` (`id`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`alfresco`.`alf_child_assoc`, CONSTRAINT `fk_alf_cass_pnode` FOREIGN KEY (`parent_node_id`) REFERENCES `alf_node` (`id`))

How I can resolve this issuee , issue seams to be with some deleted nodes , whoes entry is still exist somewhere, resulting foreign key constraint fails.
9 REPLIES 9

mitpatoliya
Star Collaborator
Star Collaborator
I think this is because the OOTB schedular which runs at that time and try to purge the deleted nodes where  one of the entry is missing.
If you are using the enterprise version then I guess you can try full re indexing.

ashwini
Champ in-the-making
Champ in-the-making
No I am using community edition, and I tried full indexing but it throws exception for some nodes, I thinks its because of the same nodes.

You can see the exception in post
https://forums.alfresco.com/en/viewtopic.php?f=8&t=46213

Is there any other way to get rid of this.

t_sato
Champ in-the-making
Champ in-the-making
Hi,

What about tracing SQL to figure out which record is actually making the violation, at least to move next?

JDBC option:
profileSQL=true

mitpatoliya
Star Collaborator
Star Collaborator
Hi Ashwini,
Even for the community versions there is problem of solr license.
check out this .
https://forums.alfresco.com/en/viewtopic.php?f=2&t=45940

ashwini
Champ in-the-making
Champ in-the-making
but I am not using Solr , I have configured my system to run with Mysql database and Lucene indexing.

mitpatoliya
Star Collaborator
Star Collaborator
Could you once try lucene full reindexing?
i.e. add the entry

index.recovery.mode=FULL

in you alfresco-global.properties file and restart the server.

ashwini
Champ in-the-making
Champ in-the-making
Ya I have already done that  and got below exceptions :

https://forums.alfresco.com/en/viewtopic.php?f=8&t=46213

and if someone googles this thread: solution is also here:
https://forums.alfresco.com/en/viewtopic.php?f=8&t=46213

niketapatel
Star Contributor
Star Contributor
We also faced same issue and here I have given detailed steps to resolve it!!!

http://niketa-alfresco3.blogspot.in/2013/09/failed-to-purge-nodes.html