getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.07k stars 4.19k forks source link

"Unable to fetch all project stats" for API "api/0/organizations/sentry/projects/" 500 #72670

Closed maxming2333 closed 4 months ago

maxming2333 commented 4 months ago

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

open "https://xxxx.com/organizations/sentry/projects/"

show this:

image

Expected Result

Environment:

image

Special configuration:

image image

The more special configuration is that the Root URL and SENTRY_PUBLIC_ENDPOINT I configured are two different domain names.

This is because I want to separate permissions for external reporting and internal management access through domain names.

Root URL is used for internal network access management terminal, SENTRY_PUBLIC_ENDPOINT is used for external network reporting to sentry

Actual Result

Same issues :

For web logs:

06:02:08 [INFO] sentry.access.api: api.access (method='POST' view='sentry.api.endpoints.relay.project_configs.RelayProjectConfigsEndpoint' response=200 user_id='None' is_app='None' token_type='None' is_frontend_request='False' organization_id='None' auth_id='None' path='/api/0/relays/projectconfigs/' caller_ip='172.23.0.41' user_agent='None' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.009328126907348633 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
06:02:09 [INFO] sentry.superuser: superuser.request (url='http://xxxx.com/api/0/organizations/sentry/projects/?dataset=metricsEnhanced&query=id%3A40%20id%3A41%20id%3A42%20id%3A35%20id%3A36%20id%3A51%20id%3A37%20id%3A49%20id%3A55%20id%3A47&sessionStats=1&statsPeriod=24h&transactionStats=1' method='GET' ip_address='192.168.86.195' user_id=16)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 307, 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 440, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/drf_spectacular/drainage.py", line 193, in wrapped_method
    return method(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/endpoints/organization_projects.py", line 173, in get
    return self.paginate(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 559, in paginate
    results = on_results(cursor_result.results)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/endpoints/organization_projects.py", line 171, in serialize_on_result
    return serialize(result, request.user, serializer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/base.py", line 70, in serialize
    attrs = serializer.get_attrs(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 667, in get_attrs
    attrs = super().get_attrs(item_list, user)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 556, in get_attrs
    attrs = super().get_attrs(item_list, user)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 339, in get_attrs
    transaction_stats = self.get_stats(project_ids, "event.type:transaction")
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 399, in get_stats
    stats = self.dataset.top_events_timeseries(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/snuba/metrics_enhanced_performance.py", line 210, in top_events_timeseries
    return metrics_top_events_timeseries(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/snuba/metrics_performance.py", line 399, in top_events_timeseries
    result = top_events_builder.run_query(referrer)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/search/events/builder/metrics.py", line 1911, in run_query
    results = bulk_snql_query(queries, referrer, use_cache)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 862, in bulk_snql_query
    return bulk_snuba_queries(requests, referrer, use_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 886, in bulk_snuba_queries
    return _apply_cache_and_build_results(params, referrer=referrer, use_cache=use_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 949, in _apply_cache_and_build_results
    query_results = _bulk_snuba_query([item[1] for item in to_query], headers)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 1033, in _bulk_snuba_query
    raise clickhouse_error_codes_map.get(error["code"], QueryExecutionError)(
sentry.utils.snuba.QueryExecutionError: DB::Exception: Type mismatch in IN or VALUES section. Expected: UInt64. Got: String. Stack trace:

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x105351b0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x8f4172d in /usr/bin/clickhouse
2. ? @ 0xd5449a2 in /usr/bin/clickhouse
3. DB::convertFieldToType(DB::Field const&, DB::IDataType const&, DB::IDataType const*) @ 0xd541db7 in /usr/bin/clickhouse
4. ? @ 0xd30cd60 in /usr/bin/clickhouse
5. DB::makeExplicitSet(DB::ASTFunction const*, DB::Block const&, bool, DB::Context const&, DB::SizeLimits const&, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >&) @ 0xd30d41b in /usr/bin/clickhouse
6. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fcff5 in /usr/bin/clickhouse
7. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fce4b in /usr/bin/clickhouse
8. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fce4b in /usr/bin/clickhouse
9. DB::InterpreterSelectQuery::getSampleBlockImpl(bool) @ 0xd13891e in /usr/bin/clickhouse
10. ? @ 0xd13a3db in /usr/bin/clickhouse
11. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13b05e in /usr/bin/clickhouse
12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13c619 in /usr/bin/clickhouse
13. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd341686 in /usr/bin/clickhouse
14. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0xd0909b4 in /usr/bin/clickhouse
15. ? @ 0xd550655 in /usr/bin/clickhouse
16. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) @ 0xd553441 in /usr/bin/clickhouse
17. DB::TCPHandler::runImpl() @ 0x9024489 in /usr/bin/clickhouse
18. DB::TCPHandler::run() @ 0x9025470 in /usr/bin/clickhouse
19. Poco::Net::TCPServerConnection::start() @ 0xe3ac69b in /usr/bin/clickhouse
20. Poco::Net::TCPServerDispatcher::run() @ 0xe3acb1d in /usr/bin/clickhouse
21. Poco::PooledThread::run() @ 0x105c3317 in /usr/bin/clickhouse
22. Poco::ThreadImpl::runnableEntry(void*) @ 0x105bf11c in /usr/bin/clickhouse
23. ? @ 0x105c0abd in /usr/bin/clickhouse
24. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
25. __clone @ 0x12188f in /lib/x86_64-linux-gnu/libc-2.27.so

06:02:09 [INFO] sentry.superuser: superuser.superuser_access (superuser_token_id='vbEsjX7StS5f' user_id=16 user_email='kero.ming@hstong.com' su_org_accessed='sentry')
06:02:09 [INFO] sentry.access.api: api.access (method='GET' view='sentry.api.endpoints.organization_projects.OrganizationProjectsEndpoint' response=500 user_id='16' is_app='False' token_type='None' is_frontend_request='True' organization_id='1' auth_id='None' path='/api/0/organizations/sentry/projects/' caller_ip='192.168.86.195' user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.09853601455688477 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
06:02:09 [ERROR] django.request: Internal Server Error: /api/0/organizations/sentry/projects/ (status_code=500 request=<WSGIRequest: GET '/api/0/organizations/sentry/projects/?dataset=metricsEnhanced&query=id%3A40%20id%3A41%20id%3A42%20id%3A35%20id%3A36%20id%3A51%20id%3A37%20id%3A49%20id%3A55%20id%3A47&sessionStats=1&statsPeriod=24h&transactionStats=1'>)
06:02:09 [INFO] sentry.superuser: superuser.request (url='http://xxxx.com/api/0/organizations/sentry/projects/?dataset=metricsEnhanced&query=id%3A40%20id%3A41%20id%3A42%20id%3A35%20id%3A36%20id%3A51%20id%3A37%20id%3A49%20id%3A55%20id%3A47&sessionStats=1&statsPeriod=24h&transactionStats=1' method='GET' ip_address='192.168.86.195' user_id=16)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 307, 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 440, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/drf_spectacular/drainage.py", line 193, in wrapped_method
    return method(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/endpoints/organization_projects.py", line 173, in get
    return self.paginate(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/base.py", line 559, in paginate
    results = on_results(cursor_result.results)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/endpoints/organization_projects.py", line 171, in serialize_on_result
    return serialize(result, request.user, serializer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/base.py", line 70, in serialize
    attrs = serializer.get_attrs(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 667, in get_attrs
    attrs = super().get_attrs(item_list, user)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 556, in get_attrs
    attrs = super().get_attrs(item_list, user)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 339, in get_attrs
    transaction_stats = self.get_stats(project_ids, "event.type:transaction")
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/api/serializers/models/project.py", line 399, in get_stats
    stats = self.dataset.top_events_timeseries(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/snuba/metrics_enhanced_performance.py", line 210, in top_events_timeseries
    return metrics_top_events_timeseries(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/snuba/metrics_performance.py", line 399, in top_events_timeseries
    result = top_events_builder.run_query(referrer)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/search/events/builder/metrics.py", line 1911, in run_query
    results = bulk_snql_query(queries, referrer, use_cache)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 862, in bulk_snql_query
    return bulk_snuba_queries(requests, referrer, use_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 886, in bulk_snuba_queries
    return _apply_cache_and_build_results(params, referrer=referrer, use_cache=use_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 949, in _apply_cache_and_build_results
    query_results = _bulk_snuba_query([item[1] for item in to_query], headers)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sentry/utils/snuba.py", line 1033, in _bulk_snuba_query
    raise clickhouse_error_codes_map.get(error["code"], QueryExecutionError)(
sentry.utils.snuba.QueryExecutionError: DB::Exception: Type mismatch in IN or VALUES section. Expected: UInt64. Got: String. Stack trace:

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x105351b0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x8f4172d in /usr/bin/clickhouse
2. ? @ 0xd5449a2 in /usr/bin/clickhouse
3. DB::convertFieldToType(DB::Field const&, DB::IDataType const&, DB::IDataType const*) @ 0xd541db7 in /usr/bin/clickhouse
4. ? @ 0xd30cd60 in /usr/bin/clickhouse
5. DB::makeExplicitSet(DB::ASTFunction const*, DB::Block const&, bool, DB::Context const&, DB::SizeLimits const&, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >&) @ 0xd30d41b in /usr/bin/clickhouse
6. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fcff5 in /usr/bin/clickhouse
7. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fce4b in /usr/bin/clickhouse
8. DB::SelectQueryExpressionAnalyzer::makeSetsForIndex(std::__1::shared_ptr<DB::IAST> const&) @ 0xd2fce4b in /usr/bin/clickhouse
9. DB::InterpreterSelectQuery::getSampleBlockImpl(bool) @ 0xd13891e in /usr/bin/clickhouse
10. ? @ 0xd13a3db in /usr/bin/clickhouse
11. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13b05e in /usr/bin/clickhouse
12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13c619 in /usr/bin/clickhouse
13. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd341686 in /usr/bin/clickhouse
14. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0xd0909b4 in /usr/bin/clickhouse
15. ? @ 0xd550655 in /usr/bin/clickhouse
16. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) @ 0xd553441 in /usr/bin/clickhouse
17. DB::TCPHandler::runImpl() @ 0x9024489 in /usr/bin/clickhouse
18. DB::TCPHandler::run() @ 0x9025470 in /usr/bin/clickhouse
19. Poco::Net::TCPServerConnection::start() @ 0xe3ac69b in /usr/bin/clickhouse
20. Poco::Net::TCPServerDispatcher::run() @ 0xe3acb1d in /usr/bin/clickhouse
21. Poco::PooledThread::run() @ 0x105c3317 in /usr/bin/clickhouse
22. Poco::ThreadImpl::runnableEntry(void*) @ 0x105bf11c in /usr/bin/clickhouse
23. ? @ 0x105c0abd in /usr/bin/clickhouse
24. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
25. __clone @ 0x12188f in /lib/x86_64-linux-gnu/libc-2.27.so

06:02:10 [INFO] sentry.superuser: superuser.superuser_access (superuser_token_id='vbEsjX7StS5f' user_id=16 user_email='kero.ming@hstong.com' su_org_accessed='sentry')
06:02:10 [INFO] sentry.access.api: api.access (method='GET' view='sentry.api.endpoints.organization_projects.OrganizationProjectsEndpoint' response=500 user_id='16' is_app='False' token_type='None' is_frontend_request='True' organization_id='1' auth_id='None' path='/api/0/organizations/sentry/projects/' caller_ip='192.168.86.195' user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.09170413017272949 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
06:02:10 [ERROR] django.request: Internal Server Error: /api/0/organizations/sentry/projects/ (status_code=500 request=<WSGIRequest: GET '/api/0/organizations/sentry/projects/?dataset=metricsEnhanced&query=id%3A40%20id%3A41%20id%3A42%20id%3A35%20id%3A36%20id%3A51%20id%3A37%20id%3A49%20id%3A55%20id%3A47&sessionStats=1&statsPeriod=24h&transactionStats=1'>)

For clickhouse logs:

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x105351b0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x8f4172d in /usr/bin/clickhouse
2. ? @ 0x8f799d4 in /usr/bin/clickhouse
3. ? @ 0xd541c1a in /usr/bin/clickhouse
4. DB::convertFieldToType(DB::Field const&, DB::IDataType const&, DB::IDataType const*) @ 0xd541db7 in /usr/bin/clickhouse
5. ? @ 0xd30cd60 in /usr/bin/clickhouse
6. DB::makeExplicitSet(DB::ASTFunction const*, DB::Block const&, bool, DB::Context const&, DB::SizeLimits const&, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >&) @ 0xd30d41b in /usr/bin/clickhouse
7. DB::ActionsMatcher::makeSet(DB::ASTFunction const&, DB::ActionsMatcher::Data&, bool) @ 0xd30e919 in /usr/bin/clickhouse
8. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0xd30f33a in /usr/bin/clickhouse
9. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0xd30f52f in /usr/bin/clickhouse
10. ? @ 0xd2f366e in /usr/bin/clickhouse
11. DB::SelectQueryExpressionAnalyzer::appendWhere(DB::ExpressionActionsChain&, bool) @ 0xd2f487a in /usr/bin/clickhouse
12. DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) @ 0xd2fd441 in /usr/bin/clickhouse
13. DB::InterpreterSelectQuery::getSampleBlockImpl(bool) @ 0xd138c1b in /usr/bin/clickhouse
14. ? @ 0xd13a3db in /usr/bin/clickhouse
15. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13b05e in /usr/bin/clickhouse
16. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13c619 in /usr/bin/clickhouse
17. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd341686 in /usr/bin/clickhouse
18. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0xd0909b4 in /usr/bin/clickhouse
19. ? @ 0xd550655 in /usr/bin/clickhouse
20. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) @ 0xd553441 in /usr/bin/clickhouse
21. DB::TCPHandler::runImpl() @ 0x9024489 in /usr/bin/clickhouse
22. DB::TCPHandler::run() @ 0x9025470 in /usr/bin/clickhouse
23. Poco::Net::TCPServerConnection::start() @ 0xe3ac69b in /usr/bin/clickhouse
24. Poco::Net::TCPServerDispatcher::run() @ 0xe3acb1d in /usr/bin/clickhouse
25. Poco::PooledThread::run() @ 0x105c3317 in /usr/bin/clickhouse
26. Poco::ThreadImpl::runnableEntry(void*) @ 0x105bf11c in /usr/bin/clickhouse
27. ? @ 0x105c0abd in /usr/bin/clickhouse
28. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
29. __clone @ 0x12188f in /lib/x86_64-linux-gnu/libc-2.27.so

xxxxxx.......

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x105351b0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x8f4172d in /usr/bin/clickhouse
2. ? @ 0x8f799d4 in /usr/bin/clickhouse
3. ? @ 0xd541c1a in /usr/bin/clickhouse
4. DB::convertFieldToType(DB::Field const&, DB::IDataType const&, DB::IDataType const*) @ 0xd541db7 in /usr/bin/clickhouse
5. ? @ 0xd30cd60 in /usr/bin/clickhouse
6. DB::makeExplicitSet(DB::ASTFunction const*, DB::Block const&, bool, DB::Context const&, DB::SizeLimits const&, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >&) @ 0xd30d41b in /usr/bin/clickhouse
7. DB::ActionsMatcher::makeSet(DB::ASTFunction const&, DB::ActionsMatcher::Data&, bool) @ 0xd30e919 in /usr/bin/clickhouse
8. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0xd30f33a in /usr/bin/clickhouse
9. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0xd30f52f in /usr/bin/clickhouse
10. ? @ 0xd2f366e in /usr/bin/clickhouse
11. DB::SelectQueryExpressionAnalyzer::appendWhere(DB::ExpressionActionsChain&, bool) @ 0xd2f487a in /usr/bin/clickhouse
12. DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) @ 0xd2fd441 in /usr/bin/clickhouse
13. DB::InterpreterSelectQuery::getSampleBlockImpl(bool) @ 0xd138c1b in /usr/bin/clickhouse
14. ? @ 0xd13a3db in /usr/bin/clickhouse
15. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13b05e in /usr/bin/clickhouse
16. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd13c619 in /usr/bin/clickhouse
17. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd341686 in /usr/bin/clickhouse
18. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0xd0909b4 in /usr/bin/clickhouse
19. ? @ 0xd550655 in /usr/bin/clickhouse
20. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) @ 0xd553441 in /usr/bin/clickhouse
21. DB::TCPHandler::runImpl() @ 0x9024489 in /usr/bin/clickhouse
22. DB::TCPHandler::run() @ 0x9025470 in /usr/bin/clickhouse
23. Poco::Net::TCPServerConnection::start() @ 0xe3ac69b in /usr/bin/clickhouse
24. Poco::Net::TCPServerDispatcher::run() @ 0xe3acb1d in /usr/bin/clickhouse
25. Poco::PooledThread::run() @ 0x105c3317 in /usr/bin/clickhouse
26. Poco::ThreadImpl::runnableEntry(void*) @ 0x105bf11c in /usr/bin/clickhouse
27. ? @ 0x105c0abd in /usr/bin/clickhouse
28. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
29. __clone @ 0x12188f in /lib/x86_64-linux-gnu/libc-2.27.so

Product Area

Issues

Link

No response

DSN

No response

Version

24.4.0.dev0

getsantry[bot] commented 4 months ago

Assigning to @getsentry/support for routing ⏲️

maxming2333 commented 4 months ago

Submitted to the wrong place, closed by https://github.com/getsentry/self-hosted/issues/3127

maxming2333 commented 4 months ago

I don’t know whose problem it is, so I’d better reopen it up first.

maxming2333 commented 4 months ago

Not all queries under this api path have problems, only this url (https://xxxx.com/api/0/organizations/sentry/projects/?dataset=metricsEnhanced&query=id%3A40%20id%3A41%20id%3A42%20id%3A35%20id%3A36%20id%3A51%20id%3A37%20id%3A49%20id%3A55%20id%3A47&sessionStats=1&statsPeriod=24h&transactionStats=1) has problems

hubertdeng123 commented 4 months ago

closing this as a duplicate of https://github.com/getsentry/self-hosted/issues/3127