使用阿里云centos7.6 supervisor部署flask项目,调用数据库总是报异常 SystemExit: 1
使用centos7.6 supervisor部署flask项目,调用数据库总是报异常 SystemExit: 1
下面贴出异常报错的异常代码
2018-12-25 20:59:46 [15759:/Website/Pilot/app/v0_1/user/view.py:127] [ERROR] code_login Traceback (most recent call last):
File "/Website/Pilot/app/v0_1/user/view.py", line 100, in register
user = user_svr.get_user_by_email(email=email)
File "/Website/Pilot/services/user/user_service.py", line 25, in get_user_by_email
return self.db.query(YyUserDo).filter(YyUserDo.email == email, YyUserDo.deleted == 0).first()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first
ret = list(self[0:1])
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__
return list(res)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__
return self._execute_and_instances(context)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances
close_with_result=True)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args
**kw
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session
conn = self.session.connection(**kw)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection
execution_options=execution_options)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind
engine, execution_options)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 403, in _connection_for_bind
conn = bind.contextual_connect()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2112, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
return fn()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 387, in connect
return _ConnectionFairy._checkout(self)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 516, in checkout
rec = pool._do_get()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1138, in _do_get
self._dec_overflow()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1135, in _do_get
return self._create_connection()
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
return _ConnectionRecord(self)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 461, in __init__
self.__connect(first_connect_check=True)
File "/Website/dhenv/lib/python2.7/site-packages/sqlalchemy/pool.py", line 651, in __connect
connection = pool._invoke_creator(self)
File "/Website/dhenv/lib/python2.7/site-packages/gunicorn/workers/base.py", line 192, in handle_abort
sys.exit(1)
SystemExit: 1
哪位大神帮忙看看到底是什么问题
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论