Comment gérer error.VCollectionNotAvailableException: Collection vers le bas après l'ouverture. (10) dans ColdFusion?
-
19-09-2019 - |
Question
J'utilise ColdFusion 9, avec créer un nom de collection Verity 'shopColl'. Je crée un calendrier des tâches pour appeler un fichier CFM pour faire indexer cette collection toutes les 5 minutes.
mais je trouve cette erreur lorsque je tente de rafraîchir l'index dans la collection:
An error occurred while performing an operation in the Search Engine library.; DETAIL:The collection is not available.: com.verity.coll.VCollectionNotAvailableException: Collection down after opening. (10)
Pourriez-vous me aider comment résoudre ce problème? le processus semble correct avant jusqu'à ce soir.
Le code ci-dessous, est dans le fichier CFM que le calendrier des tâches invoquera dans la routine.
<cfprocessingdirective suppresswhitespace="true">
<cftry>
<!--- pull the content --->
<cfquery datasource="shop" name="shop.getContent">
SELECT *
FROM shop
</cfquery>
<!--- update collection --->
<cflock name="cfindex_lock" type="exclusive" timeout="30">
<cfindex collection="shopColl"
action="refresh"
type="custom"
query="shop.getContent"
key="id"
title="title"
body="title,description" >
</cflock>
<!--- Log information about document change --->
<cflog file="updateStatus" application="No"
type="information"
text="MESSAGE: Eso shop collection updated; TIME: #now()#">
<cfreturn true />
<cfcatch type="any">
<!--- Log information about error --->
<cflog file="updateStatus" application="No"
type="error"
text="MESSAGE: error in updating index -- #cfcatch.message#; DETAIL:#cfcatch.detail# TIME: #now()#">
<cfreturn false />
</cfcatch>
</cftry>
</cfprocessingdirective>
La solution
Essayez de l'exécuter en dehors d'être une tâche pour voir combien de temps il faut. Si cela prend plus de 5 minutes, il pourrait être interblocage avec la tâche planifiée.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow