Skip to content

Instantly share code, notes, and snippets.

@andrewmkhoury
Last active April 29, 2021 08:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewmkhoury/39151ca954b26d5a516d to your computer and use it in GitHub Desktop.
Save andrewmkhoury/39151ca954b26d5a516d to your computer and use it in GitHub Desktop.

Clean up sling jobs at the mongodb level in AEM6.0

  1. Log into mongo shell on the primary mongo node
  2. Download oak-mongo.js to the server
wget http://s.apache.org/oak-mongo.js
  1. Run this on the command line
mongo aem-author --shell oak-mongo.js
  1. Run these commands from the mongodb shell
oak.removeDescendantsAndSelf("/oak:index/slingeventEventId/:index")
oak.removeDescendantsAndSelf("/oak:index/event.job.topic/:index")
oak.removeDescendantsAndSelf("/var/eventing/jobs")
oak.removeDescendantsAndSelf("/var/replication/data")
  1. Start AEM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment