Commit history page timeout on main branch due to markdown link processing

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem

Loading the commit history on the main branch results in a 500 error. The issue is specific to one project and the main ref.

From the logs we can see several occurrences of this in the past 30 days: https://log.gprd.gitlab.net/app/r/s/SVUYq

Root Cause

The Projects::CommitsController#show action times out after 60 seconds. The majority of processing time is spent on markdown link processing during commit description rendering.

The error occurs in the markdown rendering pipeline:

  • lib/banzai/filter/autolink_filter.rb - autolink filter processing
  • lib/gitlab/string_range_marker.rb - string range marking for links
  • The timeout happens while processing commit descriptions with markdown links

Error Details

  • Exception: Rack::Timeout::RequestTimeoutException
  • Duration: Request ran for longer than 60000ms
  • CPU Time: ~59.23 seconds spent on markdown processing
  • Controller: Projects::CommitsController#show
  • Action: Rendering commits for display

Stack Trace Key Points

The timeout occurs during:

  1. set_commits_for_rendering - preparing commits for display
  2. prepare_commits_for_rendering - rendering commit descriptions
  3. Banzai::CommitRenderer#render - processing markdown in commit messages
  4. Banzai::ObjectRenderer#render_documents - rendering multiple commits
  5. autolink_filter - processing markdown links in descriptions

Workaround

Users can view commits using time range filters with committed_before and committed_after URL parameters to reduce the number of commits being processed.

Related Issues

  • Issue #552072 (closed)
  • Issue #515892 (closed)

Impact

  • Affects commit history viewing on the main branch
  • 500 error prevents users from accessing commit history
Edited Jan 13, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading