I reverted to commit 6a39d52b43f67f6871a1b95832edd7d27335ffee and reattempted SSE connection fix.
Each instantiation of SSE needs to keep 1 connection open for the tailable cursor. So, on line 71 of sse.js, I set the poolSize manually instead of using the default of 5.
However, for some reason, setting the connectionPool size to 1 made the tests fail. Setting it to 2 seemed to be the sweet spot for the tests.
This should result in ~60% reduction in mongo connections for applications using harvester w/ sse.
I reverted to commit 6a39d52b43f67f6871a1b95832edd7d27335ffee and reattempted SSE connection fix.
Each instantiation of SSE needs to keep 1 connection open for the tailable cursor. So, on line 71 of sse.js, I set the poolSize manually instead of using the default of 5. However, for some reason, setting the connectionPool size to 1 made the tests fail. Setting it to 2 seemed to be the sweet spot for the tests.
This should result in ~60% reduction in mongo connections for applications using harvester w/ sse.