Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

postgresql - Error in Odoo 11 postgres backup call from db manager but works via script

We have Odoo v11 installed and has been working fine for a while. A few days ago we were setting up an automated backup module in order to make some local backups and one cloud backup automatically. It worked for a while, but it started making too many backups (more than the 1/day scheduled in the module. It was making backups every minute.

We had to turn off the auto scheduled backups and when we tried using the manual backup feature from Odoo database manager, we noticed that we got an HTTP 500 Error. Upon reviewing the odoo server logs we found:

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/bus/models/bus.py", line 181, in run
    self.loop()
  File "/opt/odoo/odoo/addons/bus/models/bus.py", line 176, in loop
    event.set()
  File "/opt/odoo/odoo/odoo/sql_db.py", line 404, in __exit__
    self.close()
  File "/opt/odoo/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 288, in close
    return self._close(False)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 318, in _close
    self._cnx.rollback()
psycopg2.InterfaceError: connection already closed
2021-02-02 13:50:38,170 29144 INFO Company_production_2020-12-01_15-17-58 werkzeug: 205.211.254.213 - - [02/Feb/2021 13:50:38] "POST /web/dataset/call_button HTTP/1.1" 500 -
2021-02-02 13:50:38,177 29144 ERROR Company_production_2020-12-01_15-17-58 werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/odoo/odoo/service/server.py", line 348, in app
    return self.app(e, s)
  File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 180, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 154, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/odoo/odoo/odoo/http.py", line 1321, in __call__
    return self.dispatch(environ, start_response)
  File "/opt/odoo/odoo/odoo/http.py", line 1295, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo/odoo/http.py", line 1497, in dispatch
    response = self.get_response(httprequest, result, explicit_session)
  File "/opt/odoo/odoo/odoo/http.py", line 289, in __exit__
    self._cr.close()
  File "/opt/odoo/odoo/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 288, in close
    return self._close(False)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 318, in _close
    self._cnx.rollback()
psycopg2.InterfaceError: connection already closed
2021-02-02 13:50:38,343 29144 INFO Company_production_2020-12-01_15-17-58 odoo.sql_db: Connection to the database failed
2021-02-02 13:50:38,343 29144 INFO Company_production_2020-12-01_15-17-58 odoo.http: Generating nondb routing
2021-02-02 13:50:38,376 29144 INFO Company_production_2020-12-01_15-17-58 werkzeug: 205.211.254.213 - - [02/Feb/2021 13:50:38] "POST /web/dataset/call_kw/ir.cron/read HTTP/1.1" 404 -
2021-02-02 13:50:40,376 29144 INFO Company_production_2020-12-01_15-17-58 werkzeug: 205.211.254.213 - - [02/Feb/2021 13:50:40] "POST /web/webclient/version_info HTTP/1.1" 200 -
2021-02-02 13:50:51,700 29144 INFO Company_production_2020-12-01_15-17-58 werkzeug: 200.52.144.226 - - [02/Feb/2021 13:50:51] "POST /longpolling/poll HTTP/1.1" 200 -

Please help me understand how to debug postgres errors. It seems to be calling a roolback() and here are the processes: postgres processes

question from:https://stackoverflow.com/questions/66067929/error-in-odoo-11-postgres-backup-call-from-db-manager-but-works-via-script

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...