Document toolboxDocument toolbox

ScanningPluginLoader OutOfMemoryError

Problem

When installing or upgrading the Attachment Checker for Jira, the logs may throw the following errors 

2018-03-05 15:08:18,778 UpmAsynchronousTaskManager:thread-2 ERROR admin 907x137x1 toe96h 127.0.0.1 /rest/plugins/1.0/ [c.a.plugin.loaders.ScanningPluginLoader] Because of the following exception:
java.lang.OutOfMemoryError: GC overhead limit exceeded
	at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
	at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:393)
	at java.util.zip.ZipFile.getInputStream(ZipFile.java:374)
	at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
	at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
	at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
	at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
	at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
	at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
	at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
	at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
	at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
	at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
	at com.atlassian.jira.plugin.MasterPluginFactory.create(MasterPluginFactory.java:73)
	at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
	at com.atlassian.plugin.loaders.ScanningPluginLoader.loadFoundPlugins(ScanningPluginLoader.java:111)
	at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadFoundPlugins(PermissionCheckingPluginLoader.java:33)
	at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:887)
	at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:845)
	at com.atlassian.jira.plugin.JiraPluginManager.installPlugins(JiraPluginManager.java:171)

Solution

Due to MIME scanning, Attachment Checker requires more memory. We recommend a minimum of 2GB allocated to the JVM

You can increase the memory allocation with the instructions at https://confluence.atlassian.com/adminjiraserver/increasing-jira-application-memory-938847654.html