Wednesday 18 July 2012

Author server says "Loading" for a long, long, long time

When the Author server restarts, it can look, to the users, like it is hanging because as soon as they click on a node in the left hand nav tree they see "Loading" in the central pane. It just sits there saying "Loading" for a long, long, long time.

This can be caused by having lots of old Workflow instances hanging around (check /etc/workflow/instances). In which case, you should ensure that you install the Workflow purge tool from Adobe. [1]

The purge tool by default will clear out any Workflow instances which are less than 14 days old (well the version I have says > 1 day but the code was actually > 14 days). It can be configured to only purge COMPELTED workflow, or ALL of them. However, beware that the default configuration (in my version 1.6.1 anyway) will only purge the following workflow models :-

  • "/etc/workflow/models/dam/dam_asset_syncer_and"
  • "/etc/workflow/models/dam/update_asset"
  • "/etc/workflow/models/dam/delete_asset"
  • "/etc/workflow/models/dam/delete_dam_asset"

Therefore, make sure to add in your additional workflow models.

I used an Xpath query, like the one below to get the counts of instances for each particular workflow model :-

/jcr:root/etc/workflow/instances//element(*, cq:Workflow)[@modelId='/etc/workflow/models/activate_entity'] order by @startTime

The list of Workflow models are available in /etc/workflow/models

This is now scripted up, so that I can get a count of all of the instances for each workflow model. You can improve the query above to add a date range to your query.

NB, older versions of this tool accessed a file directly on the filesystem - this stopped it from working on our hosted servers because of the repository location & needed to be modified.

The tool works really well, and I am sure that the newer versions of the tool (v1.6.5 at time of writing) are even better. Well worth installing.

[1] http://dev.day.com/content/kb/home/cq5/CQ5SystemAdministration/howtopurgewf.html