Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Sling stops by itself after a while

Avatar

Level 1

I have a quickstart jar. After running it for a while, I see in the logs that Java VM is shutting down and sling is stopping. Any idea what is going on ?

My java version is 1.8 SE

I am giving Xmx 1024m while starting the jar.

8 Replies

Avatar

Level 10

Are you able to log into AEM? Never heard of this issue before - checking with internal ppl.

Avatar

Level 1

yes, the app comes up. I am even able to play around a bit, but then after few mins ~11 mins in some cases or ~1 hour when I give more memory, sling shuts down by itself.

Avatar

Level 6

Can you check your error.log. do you see any java max heap memory error ?

Avatar

Level 1

I checked the error log, it does not have any max heap errors. I can share it with you. I uploaded my error.log here. https://s3.console.aws.amazon.com/s3/object/symphony-aem/error.log?region=us-east-1&tab=overview

I know this is cumbersome, but maybe you can look towards the end of the file and might be able to tell me what is going wrong.

Avatar

Level 10

Support stated:

I have not seen a similar issue before.

I can say, that 1Gb of Xmx is low then a minimum requirement.

Considering that AEM 6.x use nmap mempry for tar files it is very well memory usage related issue.

Avatar

Level 1

How much memory is recommended ? I can try that straight away and get back to you.

Ok I am trying with 3G for Author and Publisher. I will post here if I see the same issue again.

Avatar

Level 1

It stopped again. This time with 3G of memory. I piped the console logs to a file and here is the output

1.11.2017 21:15:56.632 *INFO * [main] Setting sling.home=sling (default)

01.11.2017 21:15:56.633 *INFO * [main] Starting Apache Sling in /home/ubuntu/aem-install/author/sling

01.11.2017 21:15:56.636 *INFO * [main] Sling  Extension Lib Home : /home/ubuntu/aem-install/author/sling/ext

01.11.2017 21:15:56.639 *INFO * [main] Checking launcher JAR in folder /home/ubuntu/aem-install/author/sling

01.11.2017 21:15:56.648 *INFO * [main] Existing launcher is up to date, using it: 5.4.0.2_6_10-B004 (org.apache.sling.launchpad.base.jar)

01.11.2017 21:15:56.649 *INFO * [main] Loading launcher class org.apache.sling.launchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar

01.11.2017 21:15:56.650 *INFO * [main] External Libs Home (ext) is null or does not exists.

01.11.2017 21:15:56.659 *INFO * [main] Setting sling.launchpad=/home/ubuntu/aem-install/author/sling

01.11.2017 21:15:56.660 *INFO * [main] Starting launcher ...

01.11.2017 21:15:56.668 *INFO * [main] HTTP server port: 4052

01.11.2017 21:15:57.805 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Read Sling ID d5e8ea37-5b5d-4968-b8e1-aabde9a4eb4d from file /home/ubuntu/aem-install/author/sling/felix/bundle7/data/sling.id.file

01.11.2017 21:15:57.821 *INFO* [FelixStartLevel] org.apache.sling.settings.impl.SlingSettingsServiceImpl Active run modes: [crx3, author, samplecontent, crx3tar]

01.11.2017 21:15:57.854 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice Service [org.apache.sling.commons.logservice.internal.LogServiceFactory,13, [org.osgi.service.log.LogService]] ServiceEvent REGISTERED

01.11.2017 21:15:57.855 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice Service [org.apache.sling.commons.logservice.internal.LogReaderServiceFactory,14, [org.osgi.service.log.LogReaderService]] ServiceEvent REGISTERED

01.11.2017 21:15:57.855 *INFO* [FelixStartLevel] org.apache.sling.commons.logservice BundleEvent STARTED

01.11.2017 21:15:57.856 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTING

01.11.2017 21:15:57.863 *INFO* [FelixStartLevel] org.apache.felix.configadmin Service [org.apache.felix.cm.file.FilePersistenceManager,15, [org.apache.felix.cm.PersistenceManager]] ServiceEvent REGISTERED

01.11.2017 21:15:57.877 *INFO* [FelixStartLevel] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,16, [org.osgi.service.cm.ConfigurationAdmin]] ServiceEvent REGISTERED

01.11.2017 21:15:57.879 *INFO* [FelixStartLevel] org.apache.sling.settings Service [org.apache.sling.settings.impl.SlingSettingsServiceImpl,17, [org.osgi.service.cm.ManagedService]] ServiceEvent REGISTERED

01.11.2017 21:15:57.884 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED

01.11.2017 21:15:57.884 *INFO* [FelixStartLevel] org.apache.sling.installer.core BundleEvent STARTING

01.11.2017 21:15:57.974 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Bundle Install Task Factory,18, [org.apache.sling.installer.api.tasks.InstallTaskFactory]] ServiceEvent REGISTERED

01.11.2017 21:15:57.975 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Installer - Default Resource Transformer,19, [org.apache.sling.installer.api.tasks.ResourceTransformer]] ServiceEvent REGISTERED

01.11.2017 21:15:57.975 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Installer Controller Service,20, [org.apache.sling.installer.api.OsgiInstaller, org.apache.sling.installer.api.info.InfoProvider, org.apache.sling.installer.api.ResourceChangeListener, org.apache.sling.installer.api.tasks.RetryHandler]] ServiceEvent REGISTERED

01.11.2017 21:15:57.977 *INFO* [FelixStartLevel] org.apache.sling.installer.factory.configuration Service [Apache Sling Configuration Install Task Factory,21, [org.apache.sling.installer.api.tasks.InstallTaskFactory, org.osgi.service.cm.ConfigurationListener, org.apache.sling.installer.api.tasks.ResourceTransformer]] ServiceEvent REGISTERED

01.11.2017 21:15:57.978 *INFO* [FelixStartLevel] org.apache.sling.installer.core Service [Apache Sling Installer Controller Service,22, [org.apache.sling.installer.api.jmx.InstallerMBean, org.apache.sling.installer.api.event.InstallationListener]] ServiceEvent REGISTERED

01.11.2017 21:15:57.978 *INFO* [FelixStartLevel] org.apache.sling.installer.core BundleEvent STARTED

01.11.2017 21:15:57.978 *INFO* [FelixStartLevel] org.apache.sling.commons.log BundleEvent STARTING

01.11.2017 21:15:57.980 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi Installer Service started.

01.11.2017 21:15:57.996 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [org.apache.sling.commons.log.LogManager,23, [org.osgi.service.cm.ManagedService]] ServiceEvent REGISTERED

01.11.2017 21:15:58.001 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [org.apache.sling.commons.log.LogManager.factory.writer,24, [org.osgi.service.cm.ManagedServiceFactory]] ServiceEvent REGISTERED

01.11.2017 21:15:58.004 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [org.apache.sling.commons.log.LogManager.factory.config,25, [org.osgi.service.cm.ManagedServiceFactory]] ServiceEvent REGISTERED

01.11.2017 21:15:58.015 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [Sling Log Support,26, [javax.servlet.Servlet]] ServiceEvent REGISTERED

01.11.2017 21:15:58.017 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [Sling Log Configuration Printer,27, [org.apache.sling.commons.log.logback.internal.SlingConfigurationPrinter]] ServiceEvent REGISTERED

01.11.2017 21:15:58.017 *INFO* [FelixStartLevel] org.apache.sling.commons.log Service [Sling Log Reset Event Handler,28, [org.osgi.service.event.EventHandler]] ServiceEvent REGISTERED

01.11.2017 21:15:58.023 *INFO* [FelixStartLevel] org.apache.sling.commons.log.logback.internal.Activator LogbackManager initialized at bundle startup

01.11.2017 21:15:58.023 *INFO* [FelixStartLevel] org.apache.sling.commons.log BundleEvent STARTED

01.11.2017 21:15:58.040 *INFO* [FelixStartLevel] org.apache.sling.launchpad.installer BundleEvent RESOLVED

01.11.2017 21:15:58.041 *INFO* [FelixStartLevel] org.apache.sling.launchpad.installer BundleEvent STARTING

01.11.2017 21:15:58.044 *INFO* [FelixStartLevel] org.apache.sling.launchpad.installer Service [Apache Sling Launchpad Startup Listener,29, [org.apache.sling.installer.api.event.InstallationListener]] ServiceEvent REGISTERED

01.11.2017 21:15:58.045 *INFO* [FelixStartLevel] org.apache.sling.launchpad.installer.impl.LaunchpadConfigInstaller Activating launchpad config installer, configuration path=resources/config, install path=resources/install

Attempting to load ESAPI.properties via file I/O.

Attempting to load ESAPI.properties as resource file via file I/O.

Not found in 'org.owasp.esapi.resources' directory or file not readable: /home/ubuntu/aem-install/author/ESAPI.properties

Not found in SystemResource Directory/resourceDirectory: .esapi/ESAPI.properties

Not found in 'user.home' (/home/ubuntu) directory: /home/ubuntu/esapi/ESAPI.properties

Loading ESAPI.properties via file I/O failed. Exception was: java.io.FileNotFoundException

Attempting to load ESAPI.properties via the classpath.

SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)' using class loader for DefaultSecurityConfiguration class!

Attempting to load validation.properties via file I/O.

Attempting to load validation.properties as resource file via file I/O.

Not found in 'org.owasp.esapi.resources' directory or file not readable: /home/ubuntu/aem-install/author/validation.properties

Not found in SystemResource Directory/resourceDirectory: .esapi/validation.properties

Not found in 'user.home' (/home/ubuntu) directory: /home/ubuntu/esapi/validation.properties

Loading validation.properties via file I/O failed.

Attempting to load validation.properties via the classpath.

SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/ (root)' using class loader for DefaultSecurityConfiguration class!

01.11.2017 21:16:23.046 *INFO * [main] Startup completed

01.11.2017 21:32:26.649 *INFO * [Apache Sling Terminator] Java VM is shutting down

01.11.2017 21:32:26.650 *INFO * [Apache Sling Terminator] Stopping Apache Sling

01.11.2017 21:32:38.067 *INFO * [Sling Notifier] Apache Sling has been stopped

Avatar

Administrator

Unable to access error.log link.

I would suggest you to create a support ticket for this as this requires some debugging.

~kautuk



Kautuk Sahni