AhsayOBM Backup fails with OutOfMemoryError: Direct buffer memory
Product Version
Operating System
Symptom
When performing a backup job on AhsayOBM/AhsayACB the following error is shown in the backup log:
No. | Type | Timestamp | Log |
* | ... | ... | ... |
* | info | ... | Start running pre-commands |
* | erro | YYYY/MM/DD hh:mm:ss | Unable to do backup, Error= [BlockDB.init] Error initializing bptree |
* | ... | ... | ... |
Cause
The direct buffer memory setting on your AhsayOBM/AhsayACB installation is not sufficient to support your current backup operation.
Resolution
From AhsayOBM/AhsayACB v7.9.2.0 or above the default maximum direct buffer memory is set to 512m, the maximum Java heap size is set to 1024m, and minimum Java heap size is set to 1024m. These settings can be found in the %OBC_HOME%\config.ini file.
config.ini
app.system.ui.vm.opt.xms=128
app.system.ui.vm.opt.xmx=1024
app.system.conf.vm.opt.maxdirectmemorysize=512
The maximum buffer memory setting must not be more than the maximum Java heap size setting. If the maximum buffer memory setting is increased you may need to increase the maximum Java heap size setting accordingly. As a general rule of thumb the ratio between Java heap size and direct buffer memory should around 2 to 1.
To resolve the direct memory buffer issue, please increase the direct buffer memory and maximum Java heap size for your AhsayOBM/AhsayACB installation found in the %OBC_HOME%\config.ini file.
Example: Increase direct buffer memory from 512m to 1024m, the maximum Java heap size needs to be increased from 1024m to 2048m.
Edit the %OBC_HOME%\config.ini file.
Change:
app.system.conf.vm.opt.maxdirectmemorysize=512
app.system.ui.vm.opt.xmx=1024
To:
app.system.conf.vm.opt.maxdirectmemorysize=1024
app.system.ui.vm.opt.xmx=2048
- Save the new settings.
- Restart your AhsayOBM/AhsayACB scheduler service for the new settings to take effect.