Article DetailsDetailsHelp DetailsOne might encounter that the migration of the Neo4j Version 4 database to Neo4j Version 5 got stuck due to Out of memory error. It is possible that this was stuck during the index creation. The error stack is shown below, neo4j-admin migrate --force-btree-indexes-to-range Oct 27 11:15:10 4 neo4j[10788]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007eed05260000, 65536, 0) failed; error='Not enough space' (errno=12) Oct 27 11:15:10 4 neo4j[10788]: # Oct 27 11:15:10 4 neo4j[10788]: # There is insufficient memory for the Java Runtime Environment to continue. Oct 27 11:15:10 4 neo4j[10788]: # Native memory allocation (mmap) failed to map 65536 bytes for committing reserved memory. Oct 27 11:15:10 4 neo4j[10788]: # An error report file with more information is saved as: Oct 27 11:15:10 4 neo4j[10788]: # /tmp/hs_err_pid10788.log Oct 27 11:15:24 4 neo4j[10751]: Neo4j web server failed to start. See log for more info. Oct 27 11:15:24 4 neo4j[10751]: Run with '--verbose' for a more detailed error message. This error is due to low JVM memory. In this case, we can reduce the page cache as low as 10 GB and allocate more memory to the JVM. This will facilitate index creation. Once the server starts up for the first time, we can then decrease the JVM memory and set pagecache to its original value. Config settings to control JVM and pagecache are as follows. Do these changes in the neo4j.conf of 5.x server.memory.heap.initial_size=256g server.memory.heap.max_size=256g server.memory.pagecache.size=10g Note - Heap initial size and max size are indicative here. Please configure these as per your available RAM. To understand memory management, please read this document.InformationTitleMigration to Neo4j 5 database stuck due to out of memory errorArticle Created Date3/15/2024, 10:54 PMURL Name22390926967059-Migration-to-neo4j-5-database-stuck-due-to-out-of-memory-errorLast Modified Date11/12/2025, 5:13 AM