Search code examples
memgraphdb

Hot to solve "Error in munmap(): Cannot allocate memory" in Memgraph


On my Ubuntu server I run Memgraph. I just got a bunch of errors

11/21/2023
07:15:31 PM
<jemalloc>: Error in munmap(): Cannot allocate memory
11/21/2023
07:15:32 PM
<jemalloc>: Error in munmap(): Cannot allocate memory
11/21/2023
07:15:33 PM
<jemalloc>: Error in munmap(): Cannot allocate memory
11/21/2023
07:15:34 PM
<jemalloc>: Error in munmap(): Cannot allocate memory
11/21/2023
07:15:35 PM
<jemalloc>: Error in munmap(): Cannot allocate memory
11/21/2023

I should have enough RAM, so what could be the reason for this? I'm not sure if it is related to this GiHub issue, but the new version of Memgraph is not out yet so I can't test.


Solution

  • You will notice the memgraph startup message

    Max virtual memory areas vm.max_map_count 65530 is too low, increase to at least 262144

    Run sudo sysctl -w vm.max_map_count=262144 to increase the max virtual map count