Ah, CrashPlan headless, the thing we love for offsite backup, unlimited storage vs cost. For most users acquainted to this CrashPlan server like setup, the Java heap issue is more than well known: CrashPlan is a memory hog and will stop working without any warning or readable info (other than buried in the logs), so increasing the amount of memory that it can use is of paramount importance.
CrashPlan Synology setup is one where this is a very common procedure in order to make CrashPlan backup work properly. The instructions below apply to other platforms as well, when considering different file locations.
Solution 1 – If you have access to the GUI, even for a few seconds:
Warning: this method may not be persistent. The Java heap will be reset on every CrashPlan service restart. It’s intended to be an easy way of changing it, but for persistency please use Solution 2
- Open the CrashPlan app that is previsously configured to connect to the CrashPlan headless server
- Double-click the CrashPlan logo in the upper-right corner
- Enter the following command, using a value appropriate for the size of your backup selection (for example, 1536 megabytes of RAM for a 1.5 TB selection):
java mx 1536, restart
The CrashPlan app closes
- Open the CrashPlan app and sign in
Note: if you enter just java mx then it will return the current java heap value.
Solution 2 – Via SSH / Terminal
The key is to change the value inside the file syno_package.vars:. For CrashPlan Synology users the location is below, for other users check this post for locations:
If you want to copy/paste, here’s the command for nano and vi:
sudo nano /var/packages/CrashPlan/target/syno_package.vars
sudo vi /var/packages/CrashPlan/target/syno_package.vars
In that file uncomment (erase the “#” character) the USR_MAX_HEAP variable line and change it to an adequate value. If you have 2Gb and over 1Tb of dat I suggest putting “1500M”:
#you probably only want more than the recommended 1024M if you're backing up extremely large volumes of files
After this is done, restart CrashPlan.