Why is PyMongo 3 giving ServerSelectionTimeoutError?

后端 未结 20 1106
我在风中等你
我在风中等你 2020-11-30 01:21

I\'m using:

  • Python 3.4.2
  • PyMongo 3.0.2
  • mongolab running mongod 2.6.9
  • uWSGI 2.0.10
  • CherryPy 3.7.0
  • nginx 1.6.2
20条回答
  •  心在旅途
    2020-11-30 02:02

    I encountered this too.

    This could be due to pymongo3 isn't fork safe.

    I fix this by adding --lazy-apps param to uwsgi, this can avoid the "fork safe" problem.

    seeing uwsgi doc preforking-vs-lazy-apps-vs-lazy.

    Notice, no sure for this two having positive connection.

提交回复
热议问题