Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MONGO_CONNECT option at app init. #67

Merged
merged 1 commit into from
Jan 25, 2016
Merged

Added MONGO_CONNECT option at app init. #67

merged 1 commit into from
Jan 25, 2016

Conversation

hbldh
Copy link
Contributor

@hbldh hbldh commented Nov 9, 2015

Fixes #66

When using PyMongo >= 3.0 in a multiprocessing setup, one might have to initialize the MongoClient with connect=False keyword. This pull requests adds such a setting.

@ranman
Copy link
Contributor

ranman commented Jan 24, 2016

Could you add this option to the docs and I will merge?

Added documentation about connect option.

Fixes #66
@hbldh
Copy link
Contributor Author

hbldh commented Jan 25, 2016

Added documentation and removed the connect=False in tests that I originally added. They were not needed after all.

@platinum736
Copy link

Hi hbldh ,
Does this solve the issue. I am trying same where I am accessing my mongo from 3 servers and still see this error coming. Can I do something to get away with this error. It seems sometime my mongodb is unavailable due to long write process.
Let me know if you have a solution or you need more clarifications

Will increasing server timeout help?
Thanks is advance

@dcrosta
Copy link
Collaborator

dcrosta commented Jul 5, 2018

Hi @platinum736 -- this pull request, and the issue it references, refer to a very old version of Flask-PyMongo, one that we no longer support. I suggest that you ensure you are using the latest version of Flask-PyMongo (try pip install "flask-pymongo>=2.0"), and a modern version of PyMongo (pip install "pymongo>=3.7.0").

If you have an error after that, please log a new issue or ask on stack overflow with the flask-pymongo tag. In both cases, we can help you best if you include the code that's causing the error, the error message itself including full traceback, and any relevant steps to reproduce.

@platinum736
Copy link

Thanks @dcrosta for response. I am currently using pymongo 3.6. I am using connect=false and problem seems to be solved for now though I still got ServerSelectionTimeOut error at a different line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants