我收到内部错误消息:
"TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30"
在线搜索提供了teardown_request()解决方案:
@app.teardown_request
def checkin_db(exc):
try:
print "Removing db session."
db.session.remove()
except AttributeError:
pass
现在超时错误消失了。但我不完全理解teardown_请求,看起来每次请求后都会调用db.session.remove()吗?或者每一个错误?使用这个密码安全吗?
目前没有回答
相关问题 更多 >
编程相关推荐