I am running a lookup query using aggregation pipeline. While iterating over the cursor returned from aggregation execution, I have noticed that program hangs when Mongo sends getMore command. I believe this command is used to fetch next batch of records from DB.
Initially I tested with Batch size of 100, it brings 100 records fairly quickly, but when it tries to fetch next set of records, cursor hangs. I tried the same with batch size of 2 and got the same result.
I am using Mongo Java Driver version 3.6 and server 3.6.2. I also found that there was a similar issue raised for python driver in the past(https://jira.mongodb.org/browse/PYTHON-276).
Has anyone experienced this in the past ? Any suggestions would be helpful. Let me know if any other details are required