我试图将我的 Flask 应用程序推送到赫鲁库,我的应用程序使用 Postgres 作为数据库。但是,当我尝试使用此命令在 heroku 上迁移数据库时heroku run python manage.py db init --app app它给出了这个“太多的客户端”错误,无论是心理医生2还是心理学。Running python manage.py db migrate on ⬢ petscom... up, run.5707 (Hobby)Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2285, in _wrap_pool_connect return fn() File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 303, in unique_connection return _ConnectionFairy._checkout(self) File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 773, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 492, in checkout rec = pool._do_get() File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 238, in _do_get return self._create_connection() File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection return _ConnectionRecord(self) File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 437, in __init__ self.__connect(first_connect_check=True) File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 657, in __connect pool.logger.debug("Error on connect(): %s", e) File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__ exc_value, with_traceback=exc_tb, File "/app/.heroku/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception经过一番谷歌搜索,我尝试了:赫鲁库 pg:杀戮赫鲁库重启 这些作品都没有.....
1 回答
守着星空守着你
TA贡献1799条经验 获得超8个赞
我有类似的问题。我能够通过设置环境,销毁数据库并创建一个新数据库来修复它。SQLALCHEMY_TRACK_MODIFICATIONS=False
您可以通过转到 https://data.heroku.com/datastores,打开数据库,转到“设置”并选择“销毁数据库”来销毁它。
然后像往常一样预配一个新的。
- 1 回答
- 0 关注
- 119 浏览
添加回答
举报
0/150
提交
取消