How to stop Bamboo from shutting itself down and restarting

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

If the Bamboo Server or Agents are shutting down and restarting multiple times during the day, there might be a problem with Bamboo's service wrapper.

Environment

  • Bamboo Server (running as a service on Windows)
  • Bamboo Agents (Remote/Elastic)

Investigation

Bamboo Server (running from the command line or running as a Windows service) starts up fine, but after some random period, the wrapper fails and kills the Bamboo instance. The same behavior can happen to Bamboo remote agent if the wrapper is used. These errors might be logged:

..
ERROR  | wrapper  | 2012/09/12 10:44:34 | JVM appears hung: Timed out waiting for signal from JVM.
ERROR  | wrapper  | 2012/09/12 10:44:34 | JVM did not exit on request, terminated

OR

INFO   | wrapper  | 2009/01/28 15:24:34 | Wrapper Process has not received any CPU time for 11 seconds.  Extending timeouts.
..
INFO   | jvm 1    | 2009/01/28 15:28:17 | 2009-01-28 15:28:17,299 INFO [ActiveMQ ShutdownHook] [TransportConnector] Connector vm://bamboo Stopped
INFO   | jvm 1    | 2009/01/28 15:28:17 | 2009-01-28 15:28:17,721 INFO [ActiveMQ ShutdownHook] [BrokerService] ActiveMQ JMS Message Broker (bamboo, ID:BSYTEST5-4449-1233174172549-1:0) stopped
STATUS | wrapper  | 2009/01/28 15:28:18 | <-- Wrapper Stopped

Cause

Bamboo's service wrapper comes with a timeout that specifies the interval at which the JVM is pinged. A response is expected during that interval. If the JVM is too busy, it will not respond to the ping in time.

wrapper.ping.timeout defines the timeout in seconds. 0 means that it will never time out. The default value of this setting is 30 seconds.

Solution

Increase the timeout in the wrapper's configuration. To do this, add the following line to the <bamboo-install>/conf/wrapper.conf file if it does not exist and restart the Bamboo instance (the same can be done for a Bamboo remote agent by editing the <bamboo-agent-home>/conf/wrapper.conf file if the Remote Agent is having the same problem).

wrapper.ping.timeout=90 // Reports after 90 seconds of inactivity
wrapper.ping.timeout=0  // Disables the timeout check 

You can also disable the restart action and still keep the ping checks:

wrapper.ping.timeout.action=NONE     // Do nothing
wrapper.ping.timeout.action=DUMP     // Invoke a thread dump
wrapper.ping.timeout.action=STATS    // Print performance statistics

More options can be found here:

If any elastic agents are running, ensure that they are shut down before restarting the Bamboo server. If the elastic instances are not shutdown before restarting, they will continue to run and become orphaned from your Bamboo server.

Last modified on Sep 20, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.