Lib/gitlab/current_settings.rb:32:in `method_missing'

I was on version 14.3.x (forgot the patch version) and was working on upgrading to the latest version following the upgrade path documented (summarized here) Upgrade Path

The routine that I did was as follows: (as non-root user)

  1. Backup
  2. Upgrade using apt-get command sudo apt-get install gitlab-ce=15.11.13-ce.0 replacing version each time
  3. sudo gitlab-ctl reconfigure
  4. sudo gitlab-ctl restart
  5. Waited for the below to all have 0s
sudo gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigration::BatchedMigration.with_status(:failed).count'
sudo gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'`
sudo gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigration::BatchedMigration.queued.count'

Visit my installation, and refresh the page every few seconds until the (502) something is taking too long) became successful and I could login again.

I was successful doing this on repeat until I got to version 16.5.2
I am now consistently getting a 500 error when visiting the home page (or any page)
There are no failed or pending database migrations
Reconfigure and restart don’t fix the problem
I cannot see any errors in the gitaly logs
sudo gitlab-ctl status shows everything but the registry is up (not sure why that would cause a 500?)

Status
run: alertmanager: (pid 536827) 1005s; run: log: (pid 1208) 69178s
run: gitaly: (pid 536846) 1004s; run: log: (pid 1181) 69178s
run: gitlab-exporter: (pid 536873) 1003s; run: log: (pid 1200) 69178s
run: gitlab-kas: (pid 536968) 992s; run: log: (pid 1192) 69178s
run: gitlab-workhorse: (pid 536979) 992s; run: log: (pid 1195) 69178s
run: grafana: (pid 536997) 992s; run: log: (pid 1210) 69178s
run: logrotate: (pid 537010) 991s; run: log: (pid 1197) 69178s
run: nginx: (pid 537017) 991s; run: log: (pid 1199) 69178s
run: node-exporter: (pid 537033) 991s; run: log: (pid 1179) 69178s
run: postgres-exporter: (pid 537039) 990s; run: log: (pid 1185) 69178s
run: postgresql: (pid 537056) 990s; run: log: (pid 1183) 69178s
run: prometheus: (pid 537066) 989s; run: log: (pid 1190) 69178s
run: puma: (pid 537087) 989s; run: log: (pid 1216) 69178s
run: redis: (pid 537092) 988s; run: log: (pid 1182) 69178s
run: redis-exporter: (pid 537099) 988s; run: log: (pid 1177) 69178s
down: registry: 1s, normally up, want up; run: log: (pid 1214) 69178s
run: sidekiq: (pid 537138) 985s; run: log: (pid 1188) 69178s

and the result of looking at logs for the correlation id shows the following stack trace:

JSON
: {
    "method": "GET",
    "path": "/",
    "format": "html",
    "controller": "RootController",
    "action": "index",
    "status": 500,
    "time": "2023-11-15T17:11:27.437Z",
    "params": [],
    "correlation_id": "01HF9ZERDJK5A3F3C799KHRV9C",
    "meta.caller_id": "RootController#index",
    "meta.remote_ip": "192.168.2.10",
    "meta.feature_category": "projects",
    "meta.client_id": "ip/192.168.2.10",
    "remote_ip": "192.168.2.10",
    "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0",
    "queue_duration_s": 0.006172,
    "request_urgency": "low",
    "target_duration_s": 5,
    "db_count": 0,
    "db_write_count": 0,
    "db_cached_count": 0,
    "db_replica_count": 0,
    "db_primary_count": 0,
    "db_main_count": 0,
    "db_main_replica_count": 0,
    "db_replica_cached_count": 0,
    "db_primary_cached_count": 0,
    "db_main_cached_count": 0,
    "db_main_replica_cached_count": 0,
    "db_replica_wal_count": 0,
    "db_primary_wal_count": 0,
    "db_main_wal_count": 0,
    "db_main_replica_wal_count": 0,
    "db_replica_wal_cached_count": 0,
    "db_primary_wal_cached_count": 0,
    "db_main_wal_cached_count": 0,
    "db_main_replica_wal_cached_count": 0,
    "db_replica_duration_s": 0.0,
    "db_primary_duration_s": 0.0,
    "db_main_duration_s": 0.0,
    "db_main_replica_duration_s": 0.0,
    "cpu_s": 0.536091,
    "mem_objects": 52871,
    "mem_bytes": 11157496,
    "mem_mallocs": 33541,
    "mem_total_bytes": 13272336,
    "pid": 532505,
    "worker_id": "puma_0",
    "rate_limiting_gates": [],
    "exception.class": "NoMethodError",
    "exception.message": "undefined method `default_syntax_highlighting_theme' for #<ApplicationSetting id: 1, default_projects_limit: 100000, signup_enabled: false, gravatar_enabled: true, sign_in_text: nil, created_at: \"2021-12-05 06:19:38.320846000 +0000\", updated_at: \"2023-10-09 22:34:43.200606000 +0000\", home_page_url: nil, default_branch_protection: 2, help_text: nil, restricted_visibility_levels: [], version_check_enabled: false, max_attachment_size: 10, default_project_visibility: 0, default_snippet_visibility: 0, user_oauth_applications: true, after_sign_out_path: nil, session_expire_delay: 10080, import_sources: [\"github\", \"bitbucket\", \"bitbucket_server\", \"gitlab\", \"google_code\", \"fogbugz\", \"git\", \"gitlab_project\", \"gitea\", \"manifest\", \"phabricator\"], help_page_text: nil, shared_runners_enabled: false, max_artifacts_size: 100, runners_registration_token: nil, max_pages_size: 100, require_two_factor_authentication: false, two_factor_grace_period: 48, metrics_enabled: false, metrics_host: \"localhost\", metrics_pool_size: 16, metrics_timeout: 10, metrics_method_call_threshold: 10, recaptcha_enabled: false, metrics_port: 8089, akismet_enabled: false, metrics_sample_interval: 15, email_author_in_body: false, default_group_visibility: 0, repository_checks_enabled: true, shared_runners_text: \"\", metrics_packet_size: 1, disabled_oauth_sign_in_sources: [], health_check_access_token: [FILTERED], container_registry_token_expire_delay: 5, after_sign_up_text: \"\", user_default_external: true, elasticsearch_indexing: [FILTERED], elasticsearch_search: [FILTERED], repository_storages: [\"default\"], enabled_git_access_protocol: \"\", usage_ping_enabled: false, sign_in_text_html: \"\", help_page_text_html: \"\", shared_runners_text_html: \"\", after_sign_up_text_html: \"\", rsa_key_restriction: 0, dsa_key_restriction: 0, ecdsa_key_restriction: 0, ed25519_key_restriction: 0, housekeeping_enabled: true, housekeeping_bitmaps_enabled: true, housekeeping_incremental_repack_period: 10, housekeeping_full_repack_period: 50, housekeeping_gc_period: 200, html_emails_enabled: true, plantuml_url: \"http://192.168.200.5:8080/plantuml\", plantuml_enabled: true, shared_runners_minutes: 0, repository_size_limit: 0, terminal_max_session_time: 0, unique_ips_limit_per_user: 10, unique_ips_limit_time_window: 3600, unique_ips_limit_enabled: false, default_artifacts_expire_in: \"30 days\", elasticsearch_url: [FILTERED], elasticsearch_aws: [FILTERED], elasticsearch_aws_region: [FILTERED], elasticsearch_aws_access_key: nil, geo_status_timeout: 10, uuid: \"bf55b5a8-a24f-44f4-a36b-d1ea70467fea\", polling_interval_multiplier: 0.1e1, cached_markdown_version: 2097152, check_namespace_plan: false, mirror_max_delay: 300, mirror_max_capacity: 100, mirror_capacity_threshold: 50, prometheus_metrics_enabled: true, authorized_keys_enabled: true, help_page_hide_commercial_content: [FILTERED], help_page_support_url: nil, slack_app_enabled: false, slack_app_id: nil, performance_bar_allowed_group_id: nil, allow_group_owners_to_manage_ldap: true, hashed_storage_enabled: true, project_export_enabled: true, auto_devops_enabled: false, throttle_unauthenticated_enabled: false, throttle_unauthenticated_requests_per_period: 3600, throttle_unauthenticated_period_in_seconds: 3600, throttle_authenticated_api_enabled: false, throttle_authenticated_api_requests_per_period: 7200, throttle_authenticated_api_period_in_seconds: 3600, throttle_authenticated_web_enabled: false, throttle_authenticated_web_requests_per_period: 7200, throttle_authenticated_web_period_in_seconds: 3600, gitaly_timeout_default: 55, gitaly_timeout_medium: 30, gitaly_timeout_fast: 10, mirror_available: true, password_authentication_enabled_for_web: [FILTERED], password_authentication_enabled_for_git: [FILTERED], auto_devops_domain: \"\", external_authorization_service_enabled: false, external_authorization_service_url: nil, external_authorization_service_default_label: nil, pages_domain_verification_enabled: true, user_default_internal_regex: \"\", external_authorization_service_timeout: 0.5, external_auth_client_cert: nil, encrypted_external_auth_client_key: nil, encrypted_external_auth_client_key_iv: nil, encrypted_external_auth_client_key_pass: nil, encrypted_external_auth_client_key_pass_iv: nil, email_additional_text: nil, enforce_terms: false, file_template_project_id: nil, pseudonymizer_enabled: false, hide_third_party_offers: false, snowplow_enabled: false, snowplow_collector_hostname: nil, snowplow_cookie_domain: nil, user_show_add_ssh_key_message: true, custom_project_templates_group_id: nil, usage_stats_set_by_user_id: 2, receive_max_input_size: nil, diff_max_patch_bytes: 204800, archive_builds_in_seconds: nil, commit_email_hostname: \"users.noreply.homeserver\", protected_ci_variables: [FILTERED], runners_registration_token_encrypted: nil, local_markdown_version: 0, first_day_of_week: 0, elasticsearch_limit_indexing: [FILTERED], default_project_creation: 2, lets_encrypt_notification_email: nil, lets_encrypt_terms_of_service_accepted: false, geo_node_allowed_ips: \"0.0.0.0/0, ::/0\", encrypted_lets_encrypt_private_key: nil, encrypted_lets_encrypt_private_key_iv: nil, required_instance_ci_template: nil, dns_rebinding_protection_enabled: true, default_project_deletion_protection: false, grafana_enabled: false, lock_memberships_to_ldap: false, time_tracking_limit_to_hours: false, grafana_url: \"/-/grafana\", login_recaptcha_protection_enabled: false, outbound_local_requests_whitelist: [], raw_blob_request_limit: 300, allow_local_requests_from_web_hooks_and_services: true, allow_local_requests_from_system_hooks: true, instance_administration_project_id: nil, asset_proxy_enabled: false, asset_proxy_url: nil, encrypted_asset_proxy_secret_key: nil, encrypted_asset_proxy_secret_key_iv: nil, static_objects_external_storage_url: nil, max_personal_access_token_lifetime: nil, throttle_protected_paths_enabled: false, throttle_protected_paths_requests_per_period: 10, throttle_protected_paths_period_in_seconds: 60, protected_paths: [\"/users/password\", \"/users/sign_in\", \"/api/v3/session.json\", \"/api/v3/session\", \"/api/v4/session.json\", \"/api/v4/session\", \"/users\", \"/users/confirmation\", \"/unsubscribes/\", \"/import/github/personal_access_token\", \"/admin/session\"], throttle_incident_management_notification_enabled: false, throttle_incident_management_notification_period_in_seconds: 3600, throttle_incident_management_notification_per_period: 3600, push_event_hooks_limit: 3, push_event_activities_limit: 3, custom_http_clone_url_root: \"<hidden on purpose>\", deletion_adjourned_period: 7, license_trial_ends_on: nil, eks_integration_enabled: false, eks_account_id: nil, eks_access_key_id: nil, encrypted_eks_secret_access_key_iv: nil, encrypted_eks_secret_access_key: nil, snowplow_app_id: nil, productivity_analytics_start_date: \"2021-12-05 06:19:37.893100000 +0000\", default_ci_config_path: \"\", sourcegraph_enabled: false, sourcegraph_url: nil, sourcegraph_public_only: true, snippet_size_limit: 52428800, minimum_password_length: [FILTERED], encrypted_akismet_api_key: nil, encrypted_akismet_api_key_iv: nil, encrypted_elasticsearch_aws_secret_access_key: nil, encrypted_elasticsearch_aws_secret_access_key_iv: nil, encrypted_recaptcha_private_key: nil, encrypted_recaptcha_private_key_iv: nil, encrypted_recaptcha_site_key: nil, encrypted_recaptcha_site_key_iv: nil, encrypted_slack_app_secret: nil, encrypted_slack_app_secret_iv: nil, encrypted_slack_app_verification_token: nil, encrypted_slack_app_verification_token_iv: nil, force_pages_access_control: false, updating_name_disabled_for_users: false, instance_administrators_group_id: nil, elasticsearch_indexed_field_length_limit: [FILTERED], elasticsearch_max_bulk_size_mb: [FILTERED], elasticsearch_max_bulk_concurrency: [FILTERED], disable_overriding_approvers_per_merge_request: false, prevent_merge_requests_author_approval: false, prevent_merge_requests_committers_approval: false, email_restrictions_enabled: false, email_restrictions: \"\", npm_package_requests_forwarding: true, container_expiration_policies_enable_historic_entries: false, issues_create_limit: 300, push_rule_id: nil, group_owners_can_manage_default_branch_protection: true, container_registry_vendor: \"\", container_registry_version: \"\", container_registry_features: [], spam_check_endpoint_url: nil, spam_check_endpoint_enabled: false, elasticsearch_pause_indexing: [FILTERED], repository_storages_weighted: {\"default\"=>100}, max_import_size: 0, compliance_frameworks: [], notify_on_unknown_sign_in: true, default_branch_name: \"master\", project_import_limit: 6, project_export_limit: 6, project_download_export_limit: 1, group_import_limit: 6, group_export_limit: 6, group_download_export_limit: 1, maintenance_mode: false, maintenance_mode_message: nil, wiki_page_max_content_bytes: [FILTERED], elasticsearch_indexed_file_size_limit_kb: [FILTERED], enforce_namespace_storage_limit: false, container_registry_delete_tags_service_timeout: 250, kroki_url: nil, kroki_enabled: false, elasticsearch_client_request_timeout: [FILTERED], gitpod_enabled: false, gitpod_url: \"https://gitpod.io/\", abuse_notification_email: nil, require_admin_approval_after_user_signup: true, help_page_documentation_base_url: nil, automatic_purchased_storage_allocation: false, encrypted_ci_jwt_signing_key: [FILTERED], encrypted_ci_jwt_signing_key_iv: [FILTERED], container_registry_expiration_policies_worker_capacity: 4, elasticsearch_analyzers_smartcn_enabled: [FILTERED], elasticsearch_analyzers_smartcn_search: [FILTERED], elasticsearch_analyzers_kuromoji_enabled: [FILTERED], elasticsearch_analyzers_kuromoji_search: [FILTERED], secret_detection_token_revocation_enabled: [FILTERED], secret_detection_token_revocation_url: nil, encrypted_secret_detection_token_revocation_token: nil, encrypted_secret_detection_token_revocation_token_iv: nil, domain_denylist_enabled: false, domain_denylist: [], domain_allowlist: [], new_user_signups_cap: nil, encrypted_cloud_license_auth_token: nil, encrypted_cloud_license_auth_token_iv: nil, secret_detection_revocation_token_types_url: nil, disable_feed_token: [FILTERED], personal_access_token_prefix: \"\", rate_limiting_response_text: nil, invisible_captcha_enabled: false, container_registry_cleanup_tags_service_max_list_size: 200, git_two_factor_session_expiry: 15, keep_latest_artifact: true, notes_create_limit: 300, notes_create_limit_allowlist: [], kroki_formats: {\"bpmn\"=>false, \"blockdiag\"=>false, \"excalidraw\"=>false}, in_product_marketing_emails_enabled: true, asset_proxy_whitelist: [], admin_mode: false, delayed_project_removal: false, lock_delayed_project_removal: false, external_pipeline_validation_service_timeout: nil, encrypted_external_pipeline_validation_service_token: nil, encrypted_external_pipeline_validation_service_token_iv: nil, external_pipeline_validation_service_url: nil, throttle_unauthenticated_packages_api_requests_per_period: 800, throttle_unauthenticated_packages_api_period_in_seconds: 15, throttle_authenticated_packages_api_requests_per_period: 1000, throttle_authenticated_packages_api_period_in_seconds: 15, throttle_unauthenticated_packages_api_enabled: false, throttle_authenticated_packages_api_enabled: false, deactivate_dormant_users: false, whats_new_variant: \"all_tiers\", encrypted_spam_check_api_key: nil, encrypted_spam_check_api_key_iv: nil, floc_enabled: false, elasticsearch_username: nil, encrypted_elasticsearch_password: nil, encrypted_elasticsearch_password_iv: nil, diff_max_lines: 50000, diff_max_files: 1000, valid_runner_registrars: [\"project\", \"group\"], encrypted_mailgun_signing_key: nil, encrypted_mailgun_signing_key_iv: nil, mailgun_events_enabled: false, usage_ping_features_enabled: false, encrypted_customers_dot_jwt_signing_key: nil, encrypted_customers_dot_jwt_signing_key_iv: nil, pypi_package_requests_forwarding: true, throttle_unauthenticated_files_api_requests_per_period: 125, throttle_unauthenticated_files_api_period_in_seconds: 15, throttle_authenticated_files_api_requests_per_period: 500, throttle_authenticated_files_api_period_in_seconds: 15, throttle_unauthenticated_files_api_enabled: false, throttle_authenticated_files_api_enabled: false, max_yaml_size_bytes: 1048576, max_yaml_depth: 100, throttle_authenticated_git_lfs_requests_per_period: 1000, throttle_authenticated_git_lfs_period_in_seconds: 60, throttle_authenticated_git_lfs_enabled: false, user_deactivation_emails_enabled: true, throttle_unauthenticated_api_enabled: false, throttle_unauthenticated_api_requests_per_period: 3600, throttle_unauthenticated_api_period_in_seconds: 3600, jobs_per_stage_page_size: 200, sidekiq_job_limiter_mode: \"compress\", sidekiq_job_limiter_compression_threshold_bytes: 100000, sidekiq_job_limiter_limit_bytes: 0, suggest_pipeline_enabled: false, throttle_unauthenticated_deprecated_api_requests_per_period: 1800, throttle_unauthenticated_deprecated_api_period_in_seconds: 3600, throttle_unauthenticated_deprecated_api_enabled: false, throttle_authenticated_deprecated_api_requests_per_period: 3600, throttle_authenticated_deprecated_api_period_in_seconds: 3600, throttle_authenticated_deprecated_api_enabled: false, dependency_proxy_ttl_group_policy_worker_capacity: 2, content_validation_endpoint_url: nil, encrypted_content_validation_api_key: nil, encrypted_content_validation_api_key_iv: nil, content_validation_endpoint_enabled: [FILTERED], sentry_enabled: false, sentry_dsn: nil, sentry_clientside_dsn: nil, sentry_environment: nil, max_ssh_key_lifetime: nil, static_objects_external_storage_auth_token_encrypted: nil, future_subscriptions: [], packages_cleanup_package_file_worker_capacity: 2, container_registry_import_max_tags_count: 100, container_registry_import_max_retries: 3, container_registry_import_start_max_retries: 50, container_registry_import_max_step_duration: 300, container_registry_import_target_plan: \"free\", container_registry_import_created_before: \"2022-01-23 00:00:00.000000000 +0000\", runner_token_expiration_interval: nil, group_runner_token_expiration_interval: nil, project_runner_token_expiration_interval: nil, ecdsa_sk_key_restriction: 0, ed25519_sk_key_restriction: 0, users_get_by_id_limit: 300, users_get_by_id_limit_allowlist: [], container_registry_expiration_policies_caching: true, search_rate_limit: [FILTERED], search_rate_limit_unauthenticated: [FILTERED], encrypted_database_grafana_api_key: nil, encrypted_database_grafana_api_key_iv: nil, database_grafana_api_url: nil, database_grafana_tag: nil, public_runner_releases_url: \"https://gitlab.com/api/v4/projects/gitlab-org%2Fgi...\", encrypted_arkose_labs_public_api_key: nil, encrypted_arkose_labs_public_api_key_iv: nil, encrypted_arkose_labs_private_api_key: nil, encrypted_arkose_labs_private_api_key_iv: nil, arkose_labs_verify_api_url: nil, delete_inactive_projects: false, inactive_projects_delete_after_months: 2, inactive_projects_min_size_mb: 0, inactive_projects_send_warning_email_after_months: 1, delayed_group_deletion: true, arkose_labs_namespace: \"client\", max_export_size: 0, encrypted_slack_app_signing_secret: nil, encrypted_slack_app_signing_secret_iv: nil, container_registry_pre_import_timeout: 1800, container_registry_import_timeout: 600, pipeline_limit_per_project_user_sha: 0, password_uppercase_required: [FILTERED], password_lowercase_required: [FILTERED], password_number_required: [FILTERED], password_symbol_required: [FILTERED], maven_package_requests_forwarding: true, dingtalk_integration_enabled: false, encrypted_dingtalk_corpid: nil, encrypted_dingtalk_corpid_iv: nil, encrypted_dingtalk_app_key: nil, encrypted_dingtalk_app_key_iv: nil, encrypted_dingtalk_app_secret: nil, encrypted_dingtalk_app_secret_iv: nil, jira_connect_application_key: nil, globally_allowed_ips: \"\", container_registry_pre_import_tags_rate: 0.5e0, license_usage_data_exported: false, phone_verification_code_enabled: false, max_number_of_repository_downloads: 0, max_number_of_repository_downloads_within_time_period: 0, feishu_integration_enabled: false, encrypted_feishu_app_key: nil, encrypted_feishu_app_key_iv: nil, encrypted_feishu_app_secret: nil, encrypted_feishu_app_secret_iv: nil, error_tracking_enabled: false, error_tracking_api_url: nil, git_rate_limit_users_allowlist: [], error_tracking_access_token_encrypted: \"4m5VlnAVPozpCqi7RJy0YngAA1dR67vyD7xIJykRxb5W63xW\", invitation_flow_enforcement: false, package_registry_cleanup_policies_worker_capacity: 2, deactivate_dormant_users_period: 90, auto_ban_user_on_excessive_projects_download: false, max_pages_custom_domains_per_project: 0, cube_api_base_url: nil, encrypted_cube_api_key: nil, encrypted_cube_api_key_iv: nil, email_confirmation_setting: nil, asset_proxy_allowlist: nil, asset_proxy_secret_key: nil, external_auth_client_key: nil, external_auth_client_key_pass: nil, lets_encrypt_private_key: nil, eks_secret_access_key: nil, akismet_api_key: nil, spam_check_api_key: nil, elasticsearch_aws_secret_access_key: nil, elasticsearch_password: nil, recaptcha_private_key: nil, recaptcha_site_key: nil, slack_app_secret: nil, slack_app_signing_secret: nil, slack_app_verification_token: nil, ci_jwt_signing_key: nil, customers_dot_jwt_signing_key: nil, secret_detection_token_revocation_token: nil, cloud_license_auth_token: nil, external_pipeline_validation_service_token: nil, mailgun_signing_key: nil, database_grafana_api_key: nil, arkose_labs_public_api_key: nil, arkose_labs_private_api_key: nil, cube_api_key: nil, jitsu_administrator_password: nil, telesign_customer_xid: nil, telesign_api_key: nil, product_analytics_clickhouse_connection_string: nil, product_analytics_configurator_connection_string: nil, openai_api_key: nil>\nDid you mean?  default_artifacts_expire_in_change",
    "exception.backtrace": [
        "lib/gitlab/current_settings.rb:32:in `method_missing'",
        "lib/gitlab/color_schemes.rb:49:in `default'",
        "lib/gitlab/color_schemes.rb:68:in `for_user'",
        "lib/gitlab/gon_helper.rb:16:in `add_gon_variables'",
        "app/controllers/application_controller.rb:499:in `set_current_context'",
        "lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
        "lib/gitlab/middleware/memory_report.rb:13:in `call'",
        "lib/gitlab/middleware/speedscope.rb:13:in `call'",
        "lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'",
        "lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
        "lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
        "lib/gitlab/metrics/web_transaction.rb:46:in `run'",
        "lib/gitlab/metrics/rack_middleware.rb:16:in `call'",
        "lib/gitlab/jira/middleware.rb:19:in `call'",
        "lib/gitlab/middleware/go.rb:20:in `call'",
        "lib/gitlab/etag_caching/middleware.rb:21:in `call'",
        "lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'",
        "lib/gitlab/database/query_analyzer.rb:37:in `within'",
        "lib/gitlab/middleware/query_analyzer.rb:11:in `call'",
        "lib/gitlab/middleware/multipart.rb:173:in `call'",
        "lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
        "lib/gitlab/middleware/read_only.rb:18:in `call'",
        "lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
        "lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
        "lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
        "lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
        "lib/gitlab/middleware/request_context.rb:21:in `call'",
        "lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'",
        "config/initializers/fix_local_cache_middleware.rb:11:in `call'",
        "lib/gitlab/middleware/compressed_json.rb:37:in `call'",
        "lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
        "lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'",
        "lib/gitlab/metrics/requests_rack_middleware.rb:79:in `call'",
        "lib/gitlab/middleware/release_env.rb:13:in `call'"
    ],
    "db_duration_s": 0.0,
    "view_duration_s": 0.0,
    "duration_s": 0.52741
}

I am stuck at figuring out how to resolve this issue.

Related topic maybe? Undefined method default_syntax_highlighting_theme (#402970) · Issues · GitLab.org / GitLab · GitLab

Seems upgrading to the next version has resolved this issue and I am onto new problems so will mark this one as closed and my solution was to say lets try upgrading to the next version in the line.