postgresql 报错 psycopg2.OperationalError: SSL SYSCALL error: EOF detected 解决方法

psycopg2.OperationalError: SSL SYSCALL error: EOF detected 问题提示:

exception psycopg2.OperationalError

Exception raised for errors that are related to the database’s

operation and not necessarily under the control of the programmer,

e.g. an unexpected disconnect occurs, the data source name is not

found, a transaction Could not be processed, a memory allocation error

occurred during processing, etc.

大致意思:

针对与数据库操作相关的错误(不一定在程序员的控制下)引发的异常。 发生意外的断开连接,找不到数据源名称,无法处理事务,在处理期间发生内存分配错误

导致发生报错的原因可能是以下几种

1.慢查询

2.进程内存不足

3.其他查询正在运行,导致表被无限期锁定

4.磁盘空间不足

5.防火墙

代码已成功连接,但稍后发生OperationalError。 尝试在代码中处理这些断开的连接:将要执行的命令放入try-catch块中,如果连接断开,则尝试重新连接

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...