postgresql 致命错误: 已保留的连接位置为执行非复制请求的超级用户预留

postgresql 致命错误: 已保留的连接位置为执行非复制请求的超级用户预留,第1张

概述最近监控系统的数据库监控总是延迟,查看日志报错: 2015-08-27 10:20:19,534 ERROR Traceback (most recent call last): File "oracle_mon.py", line 306, in <module> update_status(ip, 'stop', timer.end_date) File "oracle_mon

最近监控系统的数据库监控总是延迟,查看日志报错:

2015-08-27 10:20:19,534 ERROR Traceback (most recent call last):  file "oracle_mon.py",line 306,in <module>    update_status(ip,'stop',timer.end_date)  file "oracle_mon.py",line 285,in update_status    pg.db.update("oracle_mon",where=where,status=status,stat_date=status_date)  file "/usr/lib/python2.7/site-packages/web/db.py",line 881,in update    db_cursor = self._db_cursor()  file "/usr/lib/python2.7/site-packages/web/db.py",line 566,in _db_cursor    return self.ctx.db.cursor()  file "/usr/lib/python2.7/site-packages/web/db.py",line 507,in _getctx    self._load_context(self._ctx)  file "/usr/lib/python2.7/site-packages/web/db.py",line 516,in _load_context    ctx.db = self._connect_with_pooling(self.keywords)  file "/usr/lib/python2.7/site-packages/web/db.py",line 970,in _connect_with_pooling    conn = DB._connect_with_pooling(self,keywords)  file "/usr/lib/python2.7/site-packages/web/db.py",line 563,in _connect_with_pooling    return self._pooleddb.connection()  file "/usr/lib/python2.7/site-packages/dbutils-1.1-py2.7.egg/dbutils/PooledDB.py",line 331,in connection    con = self.steady_connection()  file "/usr/lib/python2.7/site-packages/dbutils-1.1-py2.7.egg/dbutils/PooledDB.py",line 279,in steady_connection    *self._args,**self._kwargs)  file "/usr/lib/python2.7/site-packages/dbutils-1.1-py2.7.egg/dbutils/SteadyDB.py",line 134,in connect    failures,Ping,closeable,*args,**kwargs)  file "/usr/lib/python2.7/site-packages/dbutils-1.1-py2.7.egg/dbutils/SteadyDB.py",line 186,in __init__    self._store(self._create())  file "/usr/lib/python2.7/site-packages/dbutils-1.1-py2.7.egg/dbutils/SteadyDB.py",line 190,in _create    con = self._creator(*self._args,**self._kwargs)  file "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py",line 179,in connect    connection_factory=connection_factory,async=async)OperationalError: 致命错误:保留连接位置为执行非复制请求的超级用户预留

查到数据库使用的活动连接数为90左右,而pg的默认最大连接数MAX_CONNECTION=100,怀疑是数据库连接数过多导致报错。

事实果然如此,老数据库的MAX_CONNECTION=200,并没有使用默认的100。

解决办法:修改配置文件(postgresql.conf)中的默认最大连接数MAX_CONNECTION=200,重启数据库即可。

总结

以上是内存溢出为你收集整理的postgresql 致命错误: 已保留的连接位置为执行非复制请求的超级用户预留全部内容,希望文章能够帮你解决postgresql 致命错误: 已保留的连接位置为执行非复制请求的超级用户预留所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1175427.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存