I\'ve deployed an app using neo4j java embedded version under Jersey tomcat for REST API. By measuring memory usage with jconsole I noticed each REST call adds 200Mb of memory (
Java won't necessarily reclaim the memory as soon as it is available to be GCed. You might find that you're not seeing significant GC action until you get close to the heap limit. So even if you put your heap limit to 10gb, then you might find memory jumps up again. That isn't necessarily a problem.
However, to solve the issue of neo using N x Memory, you should consider sharing the embedded instance between all your endpoints. Perhaps by moving it to a service class and having a shared instance between the endpoints. If you are using Spring with Jersey then this would be easy to do as you could wire it in by Spring.