powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

Can't connect after pg13 upgrade #133

Closed seqizz closed 3 years ago

seqizz commented 3 years ago

Hi :wave:

First of all, thanks for powa :rocket:

Not sure if this is the correct repository to report, but I started to get http500's on powa-web. Log says:

...
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1240, in _execute_context
        e, statement, parameters, cursor, context
      File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1458, in _handle_dbapi_exception
        util.raise_from_cause(sqlalchemy_exception, exc_info)
      File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
        reraise(type(exception), exception, tb=exc_tb, cause=cause)
      File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 276, in reraise
        raise value.with_traceback(tb)
      File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
        cursor, statement, parameters, context
      File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 536, in do_execute
        cursor.execute(statement, parameters)
    sqlalchemy.exc.InternalError: (psycopg2.InternalError) MultiXactId 963 has not been created yet -- apparent wraparound
     [SQL: "SELECT\n       CASE WHEN id = 0 THEN\n          '<local>'\n       ELSE\n          COALESCE(alias, hostname || ':' || port)\n       END AS alias,\n        error\n
       FROM powa_servers s\n        JOIN (SELECT srvid, unnest(errors) error\n            FROM powa_snapshot_metas\n            WHERE errors IS NOT NULL\n        ) m ON m.srvid = s.id"] (Background on this error at: http://sqlalche.me/e/2j85)
[E 210311 15:17:14 web:2162] 500 GET /server/ (127.0.0.1) 44.33ms

Dropped & re-created powa DB, no joy..

Any ideas?

rjuju commented 3 years ago

Hi, Thanks a lot!

sqlalchemy.exc.InternalError: (psycopg2.InternalError) MultiXactId 963 has not been created yet -- apparent wraparound

Is there any chance you upgraded your cluster using pg_upgrade, having powa in shared_preload_librairies? If yes that's unfortunately a bug in pg_upgrade, see this thread for more details.

seqizz commented 3 years ago

Thanks for the link, we did upgrade via pg_upgrade. But apparently wipe and re-install dance worked actually, no idea why it didn't fix on the first time. Closing then, since this is a known issue already :+1:

rjuju commented 3 years ago

Thanks for the feedback, and it's a good news that the wipe cycle finally fixed the problem!