You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that this happens when I call mongo() within future.apply::future_lapply(). This might be an issue in future.apply's parallelization infrastructure (e.g. dead child processes) instead of mongolite.
P.S. I want to know the best practice in establishing multiple connections to MongoDB from R.
You don't need to do anything special to establish multiple connections, the driver is specifically designed to handle this. You can keep multiple database connections by calling mongo() several times, and let the driver handle the pooling.
However I don't think it is a good idea to do multiple database queries at the same time. But if you really want to do this, you probably need to make sure that you create and close the connection in the worker. Copying connections from the parent to the worker is probably a bad idea (perhaps that was the original cause of your troubles).
mongolite crashes on my Linux when executed using
RScript
(it works when I run interactively in the R console).The error is triggered by the iterator. I am using iterator to get a list (#236).
The text was updated successfully, but these errors were encountered: