Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Odoo: psycopg2.OperationalError: FATAL: too many connections for role "p_my_oerp_master_11234451"

Subscribe

Get notified when there's activity on this post

This question has been flagged
databaseconnectionpsycopg2rolev13
1 Reply
4424 Views
Avatar
Admin Samadeva

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


0
Avatar
Discard
Avatar
Khaled Mohammad
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.

0
Avatar
Discard
Admin Samadeva
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...

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Odoo v13 : Database Connection Leak Solved
database connection psycopg2 leak
Avatar
Avatar
1
Oct 22
3654
13c odoo.sql_db disconnecting every minute
database connection
Avatar
Avatar
Avatar
2
Mar 24
5021
On-premise Duplicate Database Not Listed Solved
database v13
Avatar
Avatar
2
Aug 20
4421
Odoo Online Database Connection
database connection odoo
Avatar
Avatar
1
Jul 24
3385
Lost connection to database odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections
database connection config
Avatar
Avatar
1
Mar 24
13572
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now