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

Conversation

Projects
None yet
4 participants
@hbldh
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@ranman

ranman Jan 24, 2016

Contributor

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

Contributor

ranman commented Jan 24, 2016

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

Added MONGO_CONNECT option at app init.
Added documentation about connect option.

Fixes #66
@hbldh

This comment has been minimized.

Show comment
Hide comment
@hbldh

hbldh Jan 25, 2016

Contributor

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

Contributor

hbldh commented Jan 25, 2016

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

@ranman ranman merged commit 75d9877 into dcrosta:master Jan 25, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

blade2005 pushed a commit to blade2005/flask-pymongo that referenced this pull request Feb 10, 2017

@platinum736

This comment has been minimized.

Show comment
Hide comment
@platinum736

platinum736 Jul 5, 2018

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

platinum736 commented Jul 5, 2018

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

This comment has been minimized.

Show comment
Hide comment
@dcrosta

dcrosta Jul 5, 2018

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@platinum736

platinum736 Jul 6, 2018

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.

platinum736 commented Jul 6, 2018

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