Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

Whenever I start Odoo following error appear: psycopg2.pool.PoolError: The Connection Pool Is Full, but Odoo stills works fine.

Odoo config:

  • db_maxconn = 8

  • max_cron_threads = 4

  • workers = 6

  • limit_memory_hard = 1073741824

  • limit_memory_soft = 1073741824

(1 + 6 + 4) * 8 = 88 < 97 (Available from DigitalOcean)


How can it be fixed?


10.244.1.51 - - [2021-04-21 11:45:01[] "POST /longpolling/poll HTTP/1.1" 500 161 8.457459
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gevent/pywsgi.py", line 884, in handle_one_response
self.run_application()
  File "/usr/lib/python3/dist-packages/gevent/pywsgi.py", line 870, in run_application
self.result = self.application(self.environ, self.start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 140, in application
  return ProxyFix(application_unproxied)(environ, start_response)
  File "/usr/lib/python3/dist-packages/werkzeug/contrib/fixers.py", line 152, in __call__
  return self.app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
  result = odoo.http.root(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1320, in __call__
  return self.dispatch(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1293, in __call__
  return self.app(environ, start_wrapped)
  File "/usr/lib/python3/dist-packages/werkzeug/wsgi.py", line 599, in __call__
  return self.app(environ, start_response)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1453, in dispatch
self.setup_db(httprequest)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1376, in setup_db
httprequest.session.db = db_monodb(httprequest)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1537, in db_monodb
  dbs = db_list(True, httprequest)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1504, in db_list
  dbs = odoo.service.db.list_dbs(force)
  File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 375, in list_dbs
  with closing(db.cursor()) as cr:
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 657, in cursor
  return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 171, in __init__
self._cnx = pool.borrow(dsn)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 540, in _locked
  return fun(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 603, in borrow
  raise PoolError('The Connection Pool Is Full')
psycopg2.pool.PoolError: The Connection Pool Is Full
{'CONTENT_LENGTH': '138',
'CONTENT_TYPE': 'application/json',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
'HTTP_ACCEPT_LANGUAGE': 'en-GB,en-US;q=0.9,en;q=0.8,de;q=0.7',
'HTTP_COOKIE': 'frontend_lang=de_CH; '
'session_id=d73d5b0caad57fade0b5dcd44f584251b2b3c4ac',
'HTTP_HOST': 'test.com',
'HTTP_ORIGIN': 'https://test.com',
'HTTP_REFERER': 'https://test.com/web',
'HTTP_SEC_CH_UA': '"Google Chrome";v="89", "Chromium";v="89", ";Not A '
'Brand";v="99"',
'HTTP_SEC_CH_UA_MOBILE': '?0',
'HTTP_SEC_FETCH_DEST': 'empty',
'HTTP_SEC_FETCH_MODE': 'cors',
'HTTP_SEC_FETCH_SITE': 'same-origin',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) '
'AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/32.32.32.32 Safari/537.36',
'HTTP_X_FORWARDED_FOR': '10.10.10.10',
'HTTP_X_FORWARDED_HOST': 'test.com',
'HTTP_X_FORWARDED_PORT': '443',
'HTTP_X_FORWARDED_PROTO': 'https',
'HTTP_X_ORIGINAL_URI': '/longpolling/poll',
'HTTP_X_REAL_IP': '10.10.10.10',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
'HTTP_X_REQUEST_ID': 'd79c0bb50523b3c8c0e8ac5cd849c18c',
'HTTP_X_SCHEME': 'https',
'PATH_INFO': '/longpolling/poll',
'QUERY_STRING': '',
'REMOTE_ADDR': '10.10.10.10',
'REMOTE_PORT': '33478',
'REQUEST_METHOD': 'POST',
'SCRIPT_NAME': '',
'SERVER_NAME': 'server-lm6nt',
'SERVER_PORT': '8072',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'gevent/1.1 Python/3.5',
'werkzeug.proxy_fix.orig_http_host': 'test.com',
'werkzeug.proxy_fix.orig_remote_addr': '44.44.44.44',
'werkzeug.proxy_fix.orig_wsgi_url_scheme': 'http',
'werkzeug.request': <Request 'https://test.com/longpolling/poll' [POST[]>,
'wsgi.errors': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>,
'wsgi.input': <gevent.pywsgi.Input object at 0x7f724ae326a8>,
'wsgi.multiprocess': False,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'https',
'wsgi.version': (1, 0)} failed with PoolError
Avatar
Zrušit

Were you able to solve it? I have the exact same issue. 
We currently suspect that we need to increase db_maxconn but cant confirm it yet. 

Related Posts Odpovědi Zobrazení Aktivita
0
srp 22
1644
3
kvě 24
8182
1
bře 20
3813
1
čvn 19
11016
0
úno 19
2600