Confluence Takes too Long to Start Due to Class Loading
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Confluence startup is very slow; it may take up to 20 minutes to complete. This can be seen in the log, where there is a big time gap in the logging messages:
1
2
3
4
5
6
7
8
2010-05-16 12:38:46,537 INFO [main\] [com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 2.10.1 (build #1517)
...
2010-05-16 12:39:17,292 INFO [main\] [beans.factory.xml.XmlBeanDefinitionReader\]
loadBeanDefinitions Loading XML bean definitions from class path resource [jmxContext.xml\]
2010-05-16 13:02:28,192 INFO [main\] [springframework.web.context.ContextLoader\]
initWebApplicationContext Root WebApplicationContext: initialization completed in 1391452 ms
...
In thread dumps, there is one thread in RUNNABLE state:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"main" prio=10 tid=0x09991400 nid=0x5163 runnable [0xb7fb0000..0xb7fb41f8\]
java.lang.Thread.State: RUNNABLE
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.exists(File.java:733)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:995)
at sun.misc.URLClassPath.getResource(URLClassPath.java:168)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
- locked <0x7d570838> (a sun.misc.Launcher$AppClassLoader)
...
Cause
As evidenced in the thread dump, the operating system is trying to load class files from the filesystem. The calls have not reached Confluence code yet.
These are the known reasons for this problem:
The files are located on an NFS share which is currently inaccessible. See further suggestions.
There is a '/net' directory under the root '/' directory in filesystem being referenced in the classpath. Confluence has some packages that look in 'net' directories. In this case, the '/net' directory is special as it seems to be a 'network' directory. Any file references within the '/net' directory incurs a timeout. Most likely, this directory is created by the automount.
Resolution
Re-establish access to inaccessible NFS share
Remove the '/net' directory from the automount directives
Was this helpful?