Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGiInstallerHook is causing the deploy to be reaaally slow #242

Open
royteeuwen opened this issue Jan 16, 2025 · 4 comments
Open

OSGiInstallerHook is causing the deploy to be reaaally slow #242

royteeuwen opened this issue Jan 16, 2025 · 4 comments

Comments

@royteeuwen
Copy link
Contributor

We are noticing that our deployments are failing because timeouts are being met, this being caused by the OSGiInstallerHook that is being used:

16.01.2025 06:07:40.000 *INFO* [CommitStats] CommitStats 12 commits by user translation-job-service from location other:java.base/java.lang.Thread.run(Thread.java:834) [CommitStats overhead was 3ms = 250.0us / commit]
16.01.2025 06:26:33.664 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.provider.installhook.OsgiInstallerHook Waited 1480142ms in total for OSGi events to become quiet (for at least 5sec)
16.01.2025 06:26:33.665 *INFO* [OsgiInstallerImpl] org.apache.jackrabbit.vault Service [14619, [org.apache.sling.installer.api.event.InstallationListener]] ServiceEvent UNREGISTERING
16.01.2025 06:26:33.694 *INFO* [OsgiInstallerImpl] org.apache.jackrabbit.vault.packaging.impl.ActivityLog Netcentric:accesscontroltool-package:3.4.0: INSTALL
16.01.2025 06:27:42.754 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.provider.installhook.OsgiInstallerHook Waited 7463ms in total for OSGi events to become quiet (for at least 4sec)
16.01.2025 06:27:42.755 *INFO* [OsgiInstallerImpl] org.apache.jackrabbit.vault Service [14659, [org.apache.sling.installer.api.event.InstallationListener]] ServiceEvent UNREGISTERING
16.01.2025 06:27:42.888 *INFO* [OsgiInstallerImpl] org.apache.jackrabbit.vault.packaging.impl.ActivityLog Valtech:aecu.complete:6.5.2: INSTALL

I'm suspecting that because there are two frameworks (accesscontroltool and aecu) using the same methodology, this might be causing deadlocks? Did you notice this before? any fix available for this?

@nhirrle
Copy link
Collaborator

nhirrle commented Jan 16, 2025

Hello @royteeuwen

I haven't noticed this issue yet. I have aecu and AC Tool running but on AEM Cloud. This is then on AEM 6.5? Which versions exactly so we can reproduce?

Best, Nicolas

@royteeuwen
Copy link
Contributor Author

@nhirrle this is indeed on 6.5.21, both packages are part of one big frameworks package containing all frameworks (jars / content packages we install). We migrated away from using the crx-quickstart/install folder for jars + separate content packages to this setup to be more in line with how AEMaaCS would work, and this is the result when trying to install on higher envs.

@nhirrle
Copy link
Collaborator

nhirrle commented Jan 16, 2025

@royteeuwen I didn't went into details but it looks like the pitfalls described on the sling doc may be the root cause https://sling.apache.org/documentation/bundles/installer-provider-installhook.html#pitfalls-1
If you can create a reproducable case we can investigate further. Meanwhile you may want to have a separate aecu package with the installhook definition

@royteeuwen
Copy link
Contributor Author

royteeuwen commented Jan 17, 2025

@nhirrle hmm, might be the case indeed, but that would make it impossible to ever add the aecu package as a subpackage to an all package that contains other frameworks like for example acs-commons as well? If I read it correctly, it's an issue from the moment that there is a restart of a lot of things, which is unavoidable in AEM6.5 sadly enough. Sounds like a major pitfall :(

I also have a complete log of a second run for the OSGi installer hook on trace:

osgi-installer.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants