Slow deployments on AEM 6.4/6.5

A recent post on the AEM forums challenged me to look into an issue I observed myself but did not investigate further.

The observation is that during deployments maintenance tasks are stopped and started a lot, and this triggers a lot of other activities, including a lot of healtcheck executions. This slows down the deployment times and also pollutes the logfiles during deployments.

The problem is that the AEM Maintenance TaskScheduler is supposed to react on changes on some paths in the repository (where the configuration is stored), but unfortunately it also reacts on any change of ResourceProviders (and every Servlet is implemented as a single ResourceProvider). And because this causes a complete reload/restart of the maintenance tasks (and some healthchecks as well), it’s causing quite some delay.

But this behaviour is controlled via OSGI properties, which are missing by default, so we can add them on our own 🙂

Just create a OSGI configuration for com.adobe.granite.maintenance.impl.TaskScheduler and add a single multi-value property named “resource.change.types” with  the values “ADDED”, “CHANGED”, “REMOVED”.

(please also report this behavior via Daycare and refer to GRANITE-29609, so we hopefully get a fix for it, instead of applying this workaround).

4 thoughts on “Slow deployments on AEM 6.4/6.5

  1. Could you please post how this is visible? What should we look for in the logs to see if we are affected by this bug?

    1. Hi Wim, this is not really a bug, it’s a missed opportunity for performance optimization 🙂

      You can spot it, when during (local) deployment a lot of services are restarted, which have “maintenance” in their names. And which do not have an obvious dependency to your code and you don’t have a dependency to these services. Then you can give it a try.

  2. Hello Jorg,

    We are also facing this issue on our servers. What will be impact of putting this configuration?
    Will it stop these maintenance activities?

    Does this has anything to do with any custom bundle inclusion? For example we have created few OSGI bundles using BND tool and added them to our project.

    Thanks in advance.

    1. Hi,

      There should not be any impact on the application and its functioning. This will only limit the number of restarts of services.

      Jörg

Comments are closed.