Reputation: 85
I am evaluating neo4j for production usage. During my playing around with neo4j it crashed (OutOfMemory exceptions) many times due to non-optimized queries.
I understand that perhaps there's not enough memory. In other databases I've used the server doesn't just crash, but instead slows down or terminates a specific query/transaction. Neo4j on the other hand simply shuts down.
Is there a way to configure neo4j to not crash?
you can configure several options, that we e.g. have also enabled in sandbox:
- transaction and global memory limits, the global memory limit should be around 70% of the configured heap, and if you know what the concurrency of your statements is you can also configure the per-statement memory limit if you don't have outlier queries
- transaction timeouts, limit queries to at most X seconds runtime and abort them after
Those settings should be default for new installations but unfortunately aren't yet.
Upvotes: 0
Views: 102
Reputation: 20185
You will want to control and limit transaction memory usage, see : https://neo4j.com/docs/operations-manual/current/performance/memory-configuration/#memory-configuration-limit-transaction-memory
Upvotes: 1