python - psycopg2.DatabaseError:状态为 PGRES_TUPLES_OK 的错误,并且没有来自 Flask Celery 应用程序中的 libpq 错误的消息
问题描述
在随机发生的情况下,我注意到使用 SQLAlchemy 的 Flask Celery 应用程序中的此类错误。
当我检查数据库连接时,它很好。该应用程序似乎以某种方式失去了与 PostgreSQL 数据库服务器的连接。
[2021-02-08 00:01:00,124: ERROR/ForkPoolWorker-1] Task gbms.celery_service.create_recurring_tasks[04c258ab-9162-44ed-86ff-f90c4a214fd2] raised unexpected: DatabaseError('(psycopg2.DatabaseError) error with status PGRES_TUPLES_OK and no message from the libpq')
Traceback (most recent call last):
File "/gbmsenv/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/gbmsenv/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
psycopg2.DatabaseError: error with status PGRES_TUPLES_OK and no message from the libpq
The above exception was the direct cause of the following exception:
我应该采取哪些步骤来确定原因并解决问题?
解决方案
推荐阅读
- python-3.x - 什么 GetPostData() 使用 cefpython3 返回 { }?
- ansible - 我可以创建和使用自己的 Ansible 模块吗?
- python - 使用 canon_cr3 库从 .CR3 文件中获取未压缩的图像数据
- python - numpy :在 3D 欧几里得坐标中找到 2 组 4 个点的变换矩阵
- javascript - React Native:如何通过警报扩展此计时器?
- python - 无法完全从 url 读取数据
- maven - 处理多个条件父子管道的 gitlab-ci.yml 配置
- mysql - Laravel:路由 [PackageController.fetch] 未定义
- angular - 如何使用码头重写请求
- javascript - 如何在传单绘制中将按钮附加到弹出窗口中?