Code Monkey home page Code Monkey logo

Comments (4)

hubertdeng123 avatar hubertdeng123 commented on June 10, 2024 1

There is an ongoing duplicate issue for this: #2758

Could you follow up there? Also, what is the output of SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'sentry_groupedmessage';?

from self-hosted.

ZVilusinsky avatar ZVilusinsky commented on June 10, 2024

Hm, honestly, not sure what hit me here, after trying to recover from manual backup of volumes, the stack will start up, but can't login into the Sentry and log is full of

psycopg2.errors.UndefinedColumn: UndefinedColumn('column sentry_projectdsymfile.date_accessed does not exist\nLINE 1: ...file"."code_id", "sentry_projectdsymfile"."data", "sentry_pr...\n                                                             ^\n')
SQL: SELECT "sentry_projectdsymfile"."id", "sentry_projectdsymfile"."file_id", "sentry_projectdsymfile"."checksum", "sentry_projectdsymfile"."object_name", "sentry_projectdsymfile"."cpu_name", "sentry_projectdsymfile"."project_id", "sentry_projectdsymfile"."uuid", "sentry_projectdsymfile"."code_id", "sentry_projectdsymfile"."data", "sentry_projectdsymfile"."date_accessed", "sentry_file"."id", "sentry_file"."name", "sentry_file"."type", "sentry_file"."timestamp", "sentry_file"."headers", "sentry_file"."size", "sentry_file"."checksum", "sentry_file"."blob_id", "sentry_file"."path" FROM "sentry_projectdsymfile" INNER JOIN "sentry_file" ON ("sentry_projectdsymfile"."file_id" = "sentry_file"."id") WHERE ("sentry_projectdsymfile"."uuid" = %s AND "sentry_projectdsymfile"."project_id" = %s) ORDER BY "sentry_projectdsymfile"."id" DESC LIMIT 21

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 273, in handle_exception
    response = super().handle_exception(exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 397, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/endpoints/debug_files.py", line 299, in get
    return self.paginate(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 487, in paginate
    cursor_result = paginator.get_result(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/paginator.py", line 275, in get_result
    results = list(queryset[offset:stop])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 400, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 1928, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 91, in __iter__
    results = compiler.execute_sql(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.11/site-packages/sentry/../sentry_sdk/integrations/django/__init__.py", line 641, in execute
    result = real_execute(self, sql, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 79, in execute
    return self._execute_with_wrappers(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
    return executor(sql, params, many, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 100, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/decorators.py", line 77, in inner
    raise_the_exception(self.db, e)
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/decorators.py", line 75, in inner
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/decorators.py", line 18, in inner
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/decorators.py", line 93, in inner
    raise type(e)(f"{e!r}\nSQL: {sql}").with_traceback(e.__traceback__)
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/decorators.py", line 91, in inner
    return func(self, sql, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/db/postgres/base.py", line 84, in execute
    return self.cursor.execute(sql, clean_bad_params(params))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           

seems like the first update did not end well and we just did not notice :-/

from self-hosted.

ZVilusinsky avatar ZVilusinsky commented on June 10, 2024

We managed to recover using a backup of whole VM and I've tried to upgrade again - with the same result of error in migration.

Seems like either there is a hard stop missing in documentation, or our data(base) are somehow corrupted, despite running and ingesting events.

from self-hosted.

ZVilusinsky avatar ZVilusinsky commented on June 10, 2024

Thanks, did not find that issue. "Glad" I am not alone in this.

from self-hosted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.