【发布时间】:2019-07-27 01:23:11
【问题描述】:
我正在使用 Python 3.7 和 Flask 1.0.2
我将我的应用程序插入到 mongoDB Atlas,并且在本地一切正常
client = pymongo.MongoClient(connector)
connector 是 Atlas 给我的标准连接字符串
connector = "mongodb://xxx:<PASSWORD>@xxcluster-shard-00-00-y0phk.gcp.mongodb.net:27017,xxcluster-shard-00-01-y0phk.gcp.mongodb.net:27017,xxxcluster-shard-00-02-y0phk.gcp.mongodb.net:27017/test?ssl=true&replicaSet=xxxCluster-shard-0&authSource=admin&retryWrites=true"
当我将我的应用部署到 Google App Engine 标准 Python3 运行时环境时,它不起作用。有人知道这个问题吗?
Appengine 错误:
pymongo.errors.ServerSelectionTimeoutError: 连接 关闭,连接关闭,连接关闭”
【问题讨论】:
标签: python mongodb google-app-engine pymongo mongodb-atlas