Bamboo throws Internal Server Error when accessing a plan

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

Summary

Sometimes it is possible that you may see an Internal Server error while accessing a plan. The plan becomes inaccessible with 504 error in the UI.

Environment

7.1.2

Diagnosis

It is important to see what the error messages say. If you see the below logs, then this means Bamboo is taking long time to retrieve repository definitions:

1 2 3 4 5 6 7 8 9 10 11 12 2021-04-15 15:12:38,988 ERROR [13-PullRequestDetectionBackgroundThread:pool-20-thread-2] [BambooPluginUtils] An unexpected error has occurred while detecting pull requests: AXC-PITENTOC io.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.dao.DataAccessResourceFailureException: could not extract ResultSet; nested exception is org.hibernate.exception.JDBCConnectionException: could not extract ResultSet at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156) at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116) at com.atlassian.bamboo.plan.cache.AbstractImmutableChain.getPlanRepositoryDefinitions(AbstractImmutableChain.java:254) at com.atlassian.bamboo.plan.PlanHelper.getPlanRepositoryDefinitions(PlanHelper.java:70) at com.atlassian.bamboo.plan.PlanHelper.getDefaultPlanRepositoryDefinition(PlanHelper.java:90) at com.atlassian.bamboo.plan.pullrequest.PullRequestDetector$1.lambda$null$0(PullRequestDetector.java:73) at com.atlassian.bamboo.core.ScopedExclusionServiceHelper.lambda$adapt$2(ScopedExclusionServiceHelper.java:108) at com.atlassian.bamboo.core.ScopedExclusionServiceImpl.withLock(ScopedExclusionServiceImpl.java:63) at com.atlassian.bamboo.plan.pullrequest.PullRequestDetector$1.lambda$run$1(PullRequestDetector.java:71) (...)

Though this is unusual, this means that something is cached and corrupted or creating something like an endless loop. However the reason for this is exactly unknown.

Solution

We will need refresh the cache and indexes for this work which means restarting Bamboo and trying again to access the plan. You will need to do the below steps:

  1. Stop Bamboo.

  2. Delete the content of the folders:

    1. <bamboo-home>/caches

    2. <bamboo-home>/temp

    3. <bamboo-home>/index

  3. Start Bamboo again.

Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.