Closed zhangzhaorui closed 3 years ago
R version 3.5.1
packageVersion("mongolite") [1] ‘2.0’
Hello,buddies when what happens, this error will appear
The error is "<simpleError in mongo_collection_new(client, collection, db): Client has been destroyed.>"
I am facing the same issue with R version 4.0.3 and mongolite version 2.2.1
Observation: I have two functions which connects to the same database but differnet collection and perform an aggregate operation to get the data. Aggregation on function1 is working fine but function2 aggregation always throws error . In both the function I am making mongo connection hoping that connection pool will take care. I ran this : Rscript myscript.R Interesting when I run this using RStudio, its working.Any idea
It could be a bug in mongolite that triggers a garbage collection if you have concurrent connections.
Can you try to create a small example for me that I can use to reproduce?
This problem should be fixed in mongolite 2.3.0