Skip to Content
Menu
This question has been flagged

Since Today (the 30 of September), using Odoo v13 on Odoo.sh, after logging in my odoo account as "ADMIN" or another odoo user, i got this error every minute and get disconnected from my session:

psycopg2.OperationalError: FATAL:  too many connections for role "p_my_oerp_master_1123445"

TRACEBACK:

2022-09-30 17:01:32,442 30903 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2022-09-30 17:01:32,657 30903 INFO ? odoo.service.server: HTTP service (werkzeug) running through socket activation
2022-09-30 17:01:32,666 30903 INFO ? odoo.sql_db: Connection to the database failed
2022-09-30 17:01:32,667 30903 CRITICAL ? odoo.service.server: Failed to initialize database `my-oerp-master-1123445`. 
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/service/server.py", line 1194, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 75, in new
    registry.init(db_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 144, in init
    with closing(self.cursor()) as cr:
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 563, in cursor
    return self._db.cursor()
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 669, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 196, in __init__
    self._cnx = pool.borrow(dsn)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 552, in _locked
    return fun(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 620, in borrow
    **connection_info)
  File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  too many connections for role "p_my_oerp_master_1123445"
2022-09-30 17:01:32,727 30903 INFO ? odoo.http: HTTP Configuring static files
2022-09-30 17:01:32,736 30903 INFO my-oerp-master-1123445 odoo.sql_db: Connection to the database failed
2022-09-30 17:01:32,737 30903 INFO my-oerp-master-1123445 odoo.http: Generating nondb routing
2022-09-30 17:01:32,755 30903 INFO None odoo.sql_db: Connection to the database failed
2022-09-30 17:01:32,755 30903 WARNING my-oerp-master-1123445 odoo.service.model: method ir.cron.acquire_job failed during rpc call: FATAL:  too many connections for role "p_my_oerp_master_1123445"
2022-09-30 17:01:32,755 30903 ERROR my-oerp-master-1123445 odoo.http: FATAL:  too many connections for role "p_my_oerp_master_1123445"
 
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 61, in __new__
    return cls.registries[db_name]
  File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: 'my-oerp-master-1123445'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 1479, in dispatch
    odoo.registry(db).check_signaling()
  File "/home/odoo/src/odoo/odoo/__init__.py", line 104, in registry
    return modules.registry.Registry(database_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 63, in __new__
    return cls.new(db_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 75, in new
    registry.init(db_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 144, in init
    with closing(self.cursor()) as cr:
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 563, in cursor
    return self._db.cursor()
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 669, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 196, in __init__
    self._cnx = pool.borrow(dsn)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 552, in _locked
    return fun(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 620, in borrow
    **connection_info)
  File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  too many connections for role "p_my_oerp_master_1123445"


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 61, in __new__
    return cls.registries[db_name]
  File "/home/odoo/src/odoo/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: 'my-oerp-master-1123445'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 139, in dispatch_rpc
    result = dispatch(method, params)
  File "/usr/local/bin/odoo-rpc", line 26, in dispatch
    return odoo_dispatch(method, [db, odoo.SUPERUSER_ID, None] + list(params))
  File "/home/odoo/src/odoo/odoo/service/model.py", line 38, in dispatch
    registry = odoo.registry(db).check_signaling()
  File "/home/odoo/src/odoo/odoo/__init__.py", line 104, in registry
    return modules.registry.Registry(database_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 63, in __new__
    return cls.new(db_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 75, in new
    registry.init(db_name)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 144, in init
    with closing(self.cursor()) as cr:
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 563, in cursor
    return self._db.cursor()
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 669, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 196, in __init__
    self._cnx = pool.borrow(dsn)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 552, in _locked
    return fun(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/sql_db.py", line 620, in borrow
    **connection_info)
  File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  too many connections for role "p_my_oerp_master_1123445"

pytho


Avatar
Discard
Best Answer

1- Check that your database name is the same in odoo.conf.

2- Be sure that your database name in postgresql is not duplicated.


3- Check that db user and password are correct.



I hope this will help.

Avatar
Discard
Author

Thank you Khaled but it's not the case... because my website is running correctly but the session of my odoo-user expires every few minutes...

Related Posts Replies Views Activity
1
Oct 22
2089
2
Mar 24
2416
2
Aug 20
2705
1
Jul 24
402
1
Mar 24
9730