Postgresql fatal error: Reserved connection locations are reserved for Super Users who execute non-replication requests, and postgresql Super Users
Recently, database monitoring of the monitoring system is always delayed. An error is reported when you view the log:
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: Fatal error: Reserved connection locations are reserved for superusers who execute non-replication requests.
Check that the number of active connections used by the database is about 90, and the default maximum number of connections in pg is MAX_CONNECTION = 100. It is suspected that the error is caused by too many connections in the database.
As it turns out, the MAX_CONNECTION = 200 of the old database does not use the default 100.
Solution: Modify the default maximum number of connections in the configuration file (postgresql. conf), MAX_CONNECTION = 200, and restart the database.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.