GitLab pages gives 502 error for one root namespace

Summary

Suddenly GitLab Pages gives a 502 error for all projects below one specific root group namespace. Recently an upgrade has been done from GitLab CE 17.8.7 to 17.10.5, but we doubt this has caused the issue because in other root group namespaces everything works as expected.

The issue only occurs when the option "Use unique domain" is disabled.

We have also tested by adding the following config, but this doesn't resolve the issue. Pages projects below other namespace continue to work, but the issue stays within the problematic namespace.

gitlab_pages['internal_gitlab_server'] = 'http://localhost:8080'

Steps to reproduce

We can only reproduce the issue on our GitLab instance for the specific namespace. We create a simple project below the problem namespace that deploys a single index.html showing "Hello, World!" to GitLab pages and disable the option "Use unique domain".

Our GitLab Omnibus installation (CE 17.10.6) uses separate IP addresses for Pages; The relevant configurations are (actual IP addresses are replaced by PAGES_IPv4_ADDRESS and PAGES_IPv6_ADDRESS):

external_url 'https://gitlab.example.com'
pages_external_url "https://pages.example.com/"
gitlab_pages['enable'] = true
gitlab_pages['external_http'] = ['PAGES_IPv4_ADDRESS:80', '[PAGES_IPv6_ADDRESS]:80']
gitlab_pages['external_https'] = ['PAGES_IPv4_ADDRESS:443', '[PAGES_IPv6_ADDRESS]:443']
pages_nginx['enable'] = false

Example Project

We can't reproduce this on gitlab.com, but can provide access to a project on our GitLab instance on request.

What is the current bug behavior?

In the problematic namespace a 502 error is shown instead of the deployed index.html file. In other root namespace, the index.html is correctly shown.

What is the expected correct behavior?

The deployed index.html should be shown instead of error 502.

Relevant logs and/or screenshots

With PROBLEMGROUP being the name of the root group namespace having this issue.

{"correlation_id":"01JVSSYC8PT2S7TBXA8YCAVXKY","error":"Get \"https://gitlab.example.com/api/v4/internal/pages?host=PROBLEMGROUP.pages.example.com\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)","host":"PROBLEMGROUP.pages.example.com","level":"error","msg":"could not fetch domain information from a source","path":"/test-subgroup/troubleshoot-pages-502","time":"2025-05-21T18:13:38+02:00"}
{"content_type":"text/html; charset=utf-8","correlation_id":"01JVSSYC8PT2S7TBXA8YCAVXKY","duration_ms":0,"host":"PROBLEMGROUP.pages.example.com","level":"info","method":"GET","msg":"access","pages_https":true,"proto":"HTTP/2.0","referrer":"","remote_addr":"[REDACTED]:5199","remote_ip":"REDACTED","status":502,"system":"http","time":"2025-05-21T18:13:38+02:00","ttfb_ms":0,"uri":"/test-subgroup/troubleshoot-pages-502","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0","written_bytes":3563}

Solution

Solution was to upgrade to %17.11 as suggested in a thread bellow: #1151 (comment 2525120909)

Edited by Alexandru Croitor