Skip to end of metadata
Go to start of metadata

Installing on Linode 2048 VPS

Date Created:  

Objective:

Install Confluence a "Linode 2048" VPS , this is a small VPS with 2048 MB Ram, 1 CPU, 30 GB Disk space. Using a work around to overcome install wizard crashing during final setup process.

Issues :

Limited memory and CPU

The install Wizard crashes , with the following symptoms :

    • The browser stops displaying the install wizard and the web browser displays the error "Unable to connect"
    • The Confluence service is not running , has crashed.

Configuration:

    • Software:
      • Operating System - Ubuntu 16.04 LTS
      • Cofluence 6.7.1
      Hardware/VPS:
      • Provider - Linode
      • 1 x CPU
      • 2048 MB Ram
      • 1 x 30 GB Disk - 512 MB used for Swap.

Details:

The Linode 2048 is on the edge of what Confluence 6.7 can be installed on, without any other services running on the same VPS. The install is possible but you will need about 1400 MB to 1700 MB free memory to get the install to run. If there are exisiting services running these may need to be stopped and started post install or migrated to another VPS / server (Recommended).

If there are services running that can not be stopped the following configuration my be implamented to get the install to complete. (The final install will not be stable, this is intended as a work-around.) :

    • Assuming that Confluence is installed in /opt/atlassian/confluence/
    • Edit /opt/atlassian/confluence/bin/setenv.sh
setenv.sh
Change:
  CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"
To:
  CATALINA_OPTS="-Xms768m -Xmx768m -XX:+UseG1GC ${CATALINA_OPTS}"

    • Restart the Confluence service so that the setting are applied. Then rerun the wizard.
restart confluence
sudo /etc/init.d/confluence restart
    • Additional steps if the wizard still does not complete,
    • Edit /opt/atlassian/confluence/bin/setenv.sh
setenv.sh
Comment out the line:
From:
  CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
To:
  #CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
    • Restart the Confluence service so that the setting are applied. Then rerun the wizard.
restart confluence
sudo /etc/init.d/confluence restart
    • Once Confluence is running it is advisable to stop the Synchronicity (concurrent editing feature) as this doubles the memory required.
Confluence Configuration
Navigate: General Configuration >  Collaborative editing > Change Mode
> Select "Off"
> Click Change 

Final notes and comments:

  • This is intended purely as a work around , not a permanent fix. Java is a resource hungry beast and will consume what is can and when it hits the new low setting it will become unstable. It is likely to crash during the daily garbage cleanup process.
  • If one must run under constrained memory, Confluence 6.7 will run on the 2048 MB Ram:
    • Remove any not required application / services from the server to free up memory.
    • Disable the Synchronicity service / functionality. Note  Synchronicity uses the same settings from setenv.sh this then effectively doubles the memory used by Confluence overall.




  • No labels