We are connecting to janusgraph using java. A cluster connection with the gremlin driver is used for the connectivity. At the start, we were getting out of memory error, but tweaking some changes in gremlin-server.yaml resolved the issue. The issue raised on StackOverflow:
Changes made in gremlin-server.yaml: writeBufferLowWaterMark: 9500000 writeBufferHighWaterMark: 10000000 Every query gets stuck at 119 MB for some time i.e approx 5 mins and again starts working.