Stardog instance shutdown saying 'error='Cannot allocate memory''

We are using Stardog 4.2 with following with configurations :

# stardog-admin server status
Backup Storage Directory : .backup
CPU Load                 : 0.0000 %
Connection Timeout       : 1h
Export Storage Directory : .exports
Memory Heap              :  83M (Allocated: 1.9G Max: 1.9G)
Memory Non-Heap          :  51M (Allocated:  53M Max: 1.0G)
Platform Arch            : amd64
Platform OS              : Linux 3.13.0-73-generic, Java 1.8.0_121
Query All Graphs         : false
Query Timeout            : 5m
Stardog Home             : /opt/stardog-4.2/bin/..
Stardog Version          : 4.2
Strict Parsing           : true
Uptime                   : 1 minute 31 seconds
Watchdog Enabled         : true
Watchdog Port            : 5833
Watchdog Remote Access   : true
Databases                :
+-------+------------+-------------+-----------------+----------------------+-----------+
| Name  | Conn. Open | Trans. Open | Running Queries | Query Avg. Time (ms) | Query/sec |
+-------+------------+-------------+-----------------+----------------------+-----------+
+-------+------------+-------------+-----------------+----------------------+-----------+

Our STARDOG_JAVA_ARGS in bin/stardog.admin file are as follow :

STARDOG_JAVA_ARGS="-Xmx28g -Xms4g -XX:MaxDirectMemorySize=28g -Djava.util.Arrays.useLegacyMergeSort=true"

Usually this instance starts and works fine however sometimes it goes down with following error message :

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 2863661056, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2863661056 bytes for committing reserved memory.

We do not have much load on this instance.
We tried stardog v4.2.3 with same configurations and it goes down with same above error message.
Help us identify the root cause of this issue.

Thanks,
Yogesh

Hi,

The “Memory Heap” and “Memory Non-Heap” lines from your server status command don’t line up with the STARDOG_JAVA_ARGS you posted. Are you setting the STARDOG_JAVA_ARGS environment variable before starting up the server?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.